mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
fix(UnitMethods): GetFaction/SetFaction case update (#9)
This commit is contained in:
@@ -1707,7 +1707,7 @@ namespace LuaPlayer
|
|||||||
{
|
{
|
||||||
uint8 race = Eluna::CHECKVAL<uint8>(L, 2);
|
uint8 race = Eluna::CHECKVAL<uint8>(L, 2);
|
||||||
|
|
||||||
#ifdef TRINITY
|
#if defined TRINITY || AZEROTHCORE
|
||||||
player->SetFactionForRace(race);
|
player->SetFactionForRace(race);
|
||||||
#else
|
#else
|
||||||
player->setFactionForRace(race);
|
player->setFactionForRace(race);
|
||||||
@@ -2268,10 +2268,8 @@ namespace LuaPlayer
|
|||||||
{
|
{
|
||||||
Unit* unit = Eluna::CHECKOBJ<Unit>(L, 2);
|
Unit* unit = Eluna::CHECKOBJ<Unit>(L, 2);
|
||||||
|
|
||||||
#ifdef TRINITY
|
#if defined TRINITY || AZEROTHCORE
|
||||||
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->GetFaction());
|
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->GetFaction());
|
||||||
#elif AZEROTHCORE
|
|
||||||
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->getFaction());
|
|
||||||
#else
|
#else
|
||||||
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit);
|
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1221,7 +1221,7 @@ namespace LuaUnit
|
|||||||
*/
|
*/
|
||||||
int GetFaction(lua_State* L, Unit* unit)
|
int GetFaction(lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef TRINITY
|
#if defined TRINITY || AZEROTHCORE
|
||||||
Eluna::Push(L, unit->GetFaction());
|
Eluna::Push(L, unit->GetFaction());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->getFaction());
|
Eluna::Push(L, unit->getFaction());
|
||||||
@@ -1553,7 +1553,7 @@ namespace LuaUnit
|
|||||||
int SetFaction(lua_State* L, Unit* unit)
|
int SetFaction(lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
uint32 factionId = Eluna::CHECKVAL<uint32>(L, 2);
|
uint32 factionId = Eluna::CHECKVAL<uint32>(L, 2);
|
||||||
#ifdef TRINITY
|
#if defined TRINITY || AZEROTHCORE
|
||||||
unit->SetFaction(factionId);
|
unit->SetFaction(factionId);
|
||||||
#else
|
#else
|
||||||
unit->setFaction(factionId);
|
unit->setFaction(factionId);
|
||||||
|
|||||||
Reference in New Issue
Block a user