mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna fix mangos wotlk build
This commit is contained in:
@@ -231,7 +231,7 @@ namespace LuaGroup
|
|||||||
if (icon >= TARGETICONCOUNT)
|
if (icon >= TARGETICONCOUNT)
|
||||||
return luaL_argerror(L, 2, "valid target icon expected");
|
return luaL_argerror(L, 2, "valid target icon expected");
|
||||||
|
|
||||||
group->SetTargetIcon(icon, setter, target);
|
group->SetTargetIcon(icon, ObjectGuid(setter), ObjectGuid(target));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ void HookMgr::HandleGossipSelectOption(Player* pPlayer, Item* item, uint32 sende
|
|||||||
sEluna->Push(sEluna->L, sender);
|
sEluna->Push(sEluna->L, sender);
|
||||||
sEluna->Push(sEluna->L, action);
|
sEluna->Push(sEluna->L, action);
|
||||||
if (code.empty())
|
if (code.empty())
|
||||||
lua_pushnil(sEluna->L);
|
sEluna->Push(sEluna->L);
|
||||||
else
|
else
|
||||||
sEluna->Push(sEluna->L, code);
|
sEluna->Push(sEluna->L, code);
|
||||||
sEluna->ExecuteCall(6, 0);
|
sEluna->ExecuteCall(6, 0);
|
||||||
@@ -371,7 +371,7 @@ void HookMgr::HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 se
|
|||||||
sEluna->Push(sEluna->L, sender);
|
sEluna->Push(sEluna->L, sender);
|
||||||
sEluna->Push(sEluna->L, action);
|
sEluna->Push(sEluna->L, action);
|
||||||
if (code.empty())
|
if (code.empty())
|
||||||
lua_pushnil(sEluna->L);
|
sEluna->Push(sEluna->L);
|
||||||
else
|
else
|
||||||
sEluna->Push(sEluna->L, code);
|
sEluna->Push(sEluna->L, code);
|
||||||
sEluna->Push(sEluna->L, menuId);
|
sEluna->Push(sEluna->L, menuId);
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ typedef std::set<std::string> LoadedScripts;
|
|||||||
#define MAX_LOCALES MAX_LOCALE
|
#define MAX_LOCALES MAX_LOCALE
|
||||||
#define OVERRIDE override
|
#define OVERRIDE override
|
||||||
#define DIALOG_STATUS_SCRIPTED_NO_STATUS DIALOG_STATUS_UNDEFINED
|
#define DIALOG_STATUS_SCRIPTED_NO_STATUS DIALOG_STATUS_UNDEFINED
|
||||||
|
#define TARGETICONCOUNT TARGET_ICON_COUNT
|
||||||
typedef TemporarySummon TempSummon;
|
typedef TemporarySummon TempSummon;
|
||||||
#ifndef CLASSIC
|
#ifndef CLASSIC
|
||||||
#define PLAYER_FIELD_LIFETIME_HONORABLE_KILLS PLAYER_FIELD_LIFETIME_HONORBALE_KILLS
|
#define PLAYER_FIELD_LIFETIME_HONORABLE_KILLS PLAYER_FIELD_LIFETIME_HONORBALE_KILLS
|
||||||
|
|||||||
@@ -142,8 +142,6 @@ ElunaRegister<Object> ObjectMethods[] =
|
|||||||
{ "ToPlayer", &LuaObject::ToPlayer }, // :ToPlayer()
|
{ "ToPlayer", &LuaObject::ToPlayer }, // :ToPlayer()
|
||||||
{ "ToCorpse", &LuaObject::ToCorpse }, // :ToCorpse()
|
{ "ToCorpse", &LuaObject::ToCorpse }, // :ToCorpse()
|
||||||
{ "RemoveFlag", &LuaObject::RemoveFlag }, // :RemoveFlag(index, flag)
|
{ "RemoveFlag", &LuaObject::RemoveFlag }, // :RemoveFlag(index, flag)
|
||||||
{ "RemoveUInt64Value", &LuaObject::RemoveUInt64Value }, // :RemoveUInt64Value(index, value)
|
|
||||||
{ "AddUInt64Value", &LuaObject::AddUInt64Value }, // :AddUInt64Value(index, value)
|
|
||||||
|
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -225,21 +225,5 @@ namespace LuaObject
|
|||||||
sEluna->Push(L, obj->ToPlayer());
|
sEluna->Push(L, obj->ToPlayer());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int RemoveUInt64Value(lua_State* L, Object* obj)
|
|
||||||
{
|
|
||||||
uint16 index = sEluna->CHECKVAL<uint16>(L, 2);
|
|
||||||
uint64 value = sEluna->CHECKVAL<uint64>(L, 3);
|
|
||||||
obj->RemoveUInt64Value(index, value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int AddUInt64Value(lua_State* L, Object* obj)
|
|
||||||
{
|
|
||||||
uint16 index = sEluna->CHECKVAL<uint16>(L, 2);
|
|
||||||
uint64 value = sEluna->CHECKVAL<uint64>(L, 3);
|
|
||||||
obj->AddUInt64Value(index, value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2072,9 +2072,9 @@ namespace LuaPlayer
|
|||||||
WorldPacket data(SMSG_MESSAGECHAT, 100);
|
WorldPacket data(SMSG_MESSAGECHAT, 100);
|
||||||
data << uint8(channel);
|
data << uint8(channel);
|
||||||
data << int32(LANG_ADDON);
|
data << int32(LANG_ADDON);
|
||||||
data << uint64(player->GetGUID());
|
data << uint64(player->GET_GUID());
|
||||||
data << uint32(0);
|
data << uint32(0);
|
||||||
data << uint64(receiver->GetGUID());
|
data << uint64(receiver->GET_GUID());
|
||||||
data << uint32(fullmsg.length() + 1);
|
data << uint32(fullmsg.length() + 1);
|
||||||
data << fullmsg;
|
data << fullmsg;
|
||||||
data << uint8(0);
|
data << uint8(0);
|
||||||
|
|||||||
@@ -1251,7 +1251,11 @@ namespace LuaUnit
|
|||||||
return luaL_argerror(L, 3, "valid Language expected");
|
return luaL_argerror(L, 3, "valid Language expected");
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
|
#ifdef TRINITY
|
||||||
ChatHandler::BuildChatPacket(data, ChatMsg(type), Language(lang), unit, target, msg);
|
ChatHandler::BuildChatPacket(data, ChatMsg(type), Language(lang), unit, target, msg);
|
||||||
|
#else
|
||||||
|
ChatHandler::BuildChatPacket(data, ChatMsg(type), msg.c_str(), Language(lang), 0, unit->GET_GUID(), unit->GetName(), target->GET_GUID(), target->GetName());
|
||||||
|
#endif
|
||||||
target->GetSession()->SendPacket(&data);
|
target->GetSession()->SendPacket(&data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user