Skip to content

Commit

Permalink
Fix TrinityCore build
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 committed Apr 23, 2022
1 parent 8e53efa commit 7d041de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 7 additions & 7 deletions PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -3862,19 +3862,19 @@ namespace LuaPlayer
bool _code = Eluna::CHECKVAL<bool>(L, 6, false);
const char* _promptMsg = Eluna::CHECKVAL<const char*>(L, 7, "");
uint32 _money = Eluna::CHECKVAL<uint32>(L, 8, 0);
#if defined TRINITY || AZEROTHCORE
#if defined(TRINITY)
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, GossipOptionIcon(_icon), msg, _sender, _intid, _promptMsg, _money, _code);
#elif defined(AZEROTHCORE)
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, _icon, msg, _sender, _intid, _promptMsg, _money, _code);
#else
#if !defined(CLASSIC) && !defined(CMANGOS)
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _money, _code);
#elif CMANGOS && !defined CLASSIC
#elif defined(CMANGOS) && !defined(CLASSIC)
player->GetPlayerMenu()->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _money, _code);
#elif CMANGOS && CLASSIC
#elif defined(CMANGOS) && defined(CLASSIC)
player->GetPlayerMenu()->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _code);
#elif !defined(CLASSIC) && !defined(CMANGOS)
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _money, _code);
#else
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _code);
#endif
#endif//TRINITY
return 0;
}

Expand Down
8 changes: 8 additions & 0 deletions UnitMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,11 @@ namespace LuaUnit
*/
int GetMountId(lua_State* L, Unit* unit)
{
#ifdef TRINITY
Eluna::Push(L, unit->GetMountDisplayId());
#else
Eluna::Push(L, unit->GetMountID());
#endif
return 1;
}

Expand Down Expand Up @@ -1837,7 +1841,11 @@ namespace LuaUnit
int SetStandState(lua_State* L, Unit* unit)
{
uint8 state = Eluna::CHECKVAL<uint8>(L, 2);
#ifdef TRINITY
unit->SetStandState(UnitStandStateType(state));
#else
unit->SetStandState(state);
#endif
return 0;
}

Expand Down

0 comments on commit 7d041de

Please sign in to comment.