diff --git a/PlayerMethods.h b/PlayerMethods.h index ef1bcbb..1572002 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -2222,7 +2222,7 @@ namespace LuaPlayer #ifndef TRINITY AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit); #else - AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->getFaction()); + AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->GetFaction()); #endif if (!ahEntry) return 0; diff --git a/UnitMethods.h b/UnitMethods.h index 21deeac..2150636 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -1146,7 +1146,11 @@ namespace LuaUnit */ int GetFaction(lua_State* L, Unit* unit) { +#ifdef TRINITY + Eluna::Push(L, unit->GetFaction()); +#else Eluna::Push(L, unit->getFaction()); +#endif return 1; } @@ -1476,7 +1480,11 @@ namespace LuaUnit int SetFaction(lua_State* L, Unit* unit) { uint32 factionId = Eluna::CHECKVAL(L, 2); +#ifdef TRINITY + unit->SetFaction(factionId); +#else unit->setFaction(factionId); +#endif return 0; }