Skip to content

Commit d7191f0

Browse files
authored
Update to support latest 3.3.5 core changes (#530)
1 parent 3723561 commit d7191f0

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

methods/TrinityCore/ItemMethods.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ namespace LuaItem
391391
if (index >= MAX_ITEM_PROTO_SPELLS)
392392
return luaL_argerror(E->L, 2, "valid SpellIndex expected");
393393

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

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

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

@@ -893,7 +893,7 @@ namespace LuaItem
893893
item->SaveToDB(trans);
894894
return 0;
895895
}
896-
896+
897897
ElunaRegister<Item> ItemMethods[] =
898898
{
899899
// Getters
@@ -915,7 +915,7 @@ namespace LuaItem
915915
{ "GetQuality", &LuaItem::GetQuality },
916916
{ "GetFlags", &LuaItem::GetFlags },
917917
{ "GetFlags2", &LuaItem::GetFlags2 },
918-
{ "GetExtraFlags", &LuaItem::GetExtraFlags },
918+
{ "GetExtraFlags", &LuaItem::GetExtraFlags },
919919
{ "GetBuyCount", &LuaItem::GetBuyCount },
920920
{ "GetBuyPrice", &LuaItem::GetBuyPrice },
921921
{ "GetSellPrice", &LuaItem::GetSellPrice },

methods/TrinityCore/PlayerMethods.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace LuaPlayer
4141
int HasTalent(Eluna* E, Player* player)
4242
{
4343
uint32 spellId = E->CHECKVAL<uint32>(2);
44-
uint8 maxSpecs = MAX_TALENT_SPECS;
44+
uint8 maxSpecs = MAX_TALENT_GROUPS;
4545
uint8 spec = E->CHECKVAL<uint8>(3);
4646

4747
if (spec >= maxSpecs)
@@ -769,7 +769,7 @@ namespace LuaPlayer
769769
*/
770770
int GetSpecsCount(Eluna* E, Player* player)
771771
{
772-
E->Push(player->GetSpecsCount());
772+
E->Push(player->GetTalentGroupsCount());
773773
return 1;
774774
}
775775

@@ -780,7 +780,7 @@ namespace LuaPlayer
780780
*/
781781
int GetActiveSpec(Eluna* E, Player* player)
782782
{
783-
E->Push(player->GetActiveSpec());
783+
E->Push(player->GetActiveTalentGroup());
784784
return 1;
785785
}
786786

@@ -3771,7 +3771,7 @@ namespace LuaPlayer
37713771
uint8 spec = E->CHECKVAL<uint8>(3);
37723772
bool learning = E->CHECKVAL<bool>(4, true);
37733773

3774-
if (spec >= MAX_TALENT_SPECS)
3774+
if (spec >= MAX_TALENT_GROUPS)
37753775
E->Push(false);
37763776
else
37773777
E->Push(player->AddTalent(spellId, spec, learning));

0 commit comments

Comments
 (0)