Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions methods/TrinityCore/ItemMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ namespace LuaItem
if (index >= MAX_ITEM_PROTO_SPELLS)
return luaL_argerror(E->L, 2, "valid SpellIndex expected");

E->Push(item->GetTemplate()->Spells[index].SpellId);
E->Push(item->GetTemplate()->Effects[index].SpellID);
return 1;
}

Expand All @@ -407,7 +407,7 @@ namespace LuaItem
if (index >= MAX_ITEM_PROTO_SPELLS)
return luaL_argerror(E->L, 2, "valid SpellIndex expected");

E->Push(item->GetTemplate()->Spells[index].SpellTrigger);
E->Push(item->GetTemplate()->Effects[index].TriggerType);
return 1;
}

Expand Down Expand Up @@ -893,7 +893,7 @@ namespace LuaItem
item->SaveToDB(trans);
return 0;
}

ElunaRegister<Item> ItemMethods[] =
{
// Getters
Expand All @@ -915,7 +915,7 @@ namespace LuaItem
{ "GetQuality", &LuaItem::GetQuality },
{ "GetFlags", &LuaItem::GetFlags },
{ "GetFlags2", &LuaItem::GetFlags2 },
{ "GetExtraFlags", &LuaItem::GetExtraFlags },
{ "GetExtraFlags", &LuaItem::GetExtraFlags },
{ "GetBuyCount", &LuaItem::GetBuyCount },
{ "GetBuyPrice", &LuaItem::GetBuyPrice },
{ "GetSellPrice", &LuaItem::GetSellPrice },
Expand Down
8 changes: 4 additions & 4 deletions methods/TrinityCore/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace LuaPlayer
int HasTalent(Eluna* E, Player* player)
{
uint32 spellId = E->CHECKVAL<uint32>(2);
uint8 maxSpecs = MAX_TALENT_SPECS;
uint8 maxSpecs = MAX_TALENT_GROUPS;
uint8 spec = E->CHECKVAL<uint8>(3);

if (spec >= maxSpecs)
Expand Down Expand Up @@ -769,7 +769,7 @@ namespace LuaPlayer
*/
int GetSpecsCount(Eluna* E, Player* player)
{
E->Push(player->GetSpecsCount());
E->Push(player->GetTalentGroupsCount());
return 1;
}

Expand All @@ -780,7 +780,7 @@ namespace LuaPlayer
*/
int GetActiveSpec(Eluna* E, Player* player)
{
E->Push(player->GetActiveSpec());
E->Push(player->GetActiveTalentGroup());
return 1;
}

Expand Down Expand Up @@ -3771,7 +3771,7 @@ namespace LuaPlayer
uint8 spec = E->CHECKVAL<uint8>(3);
bool learning = E->CHECKVAL<bool>(4, true);

if (spec >= MAX_TALENT_SPECS)
if (spec >= MAX_TALENT_GROUPS)
E->Push(false);
else
E->Push(player->AddTalent(spellId, spec, learning));
Expand Down