Eluna fix mangos wotlk build

This commit is contained in:
Rochet2
2014-04-07 02:35:29 +03:00
committed by Foereaper
parent 7ed94d3e7a
commit 16b6514589
7 changed files with 10 additions and 23 deletions

View File

@@ -231,7 +231,7 @@ namespace LuaGroup
if (icon >= TARGETICONCOUNT)
return luaL_argerror(L, 2, "valid target icon expected");
group->SetTargetIcon(icon, setter, target);
group->SetTargetIcon(icon, ObjectGuid(setter), ObjectGuid(target));
return 0;
}

View File

@@ -350,7 +350,7 @@ void HookMgr::HandleGossipSelectOption(Player* pPlayer, Item* item, uint32 sende
sEluna->Push(sEluna->L, sender);
sEluna->Push(sEluna->L, action);
if (code.empty())
lua_pushnil(sEluna->L);
sEluna->Push(sEluna->L);
else
sEluna->Push(sEluna->L, code);
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, action);
if (code.empty())
lua_pushnil(sEluna->L);
sEluna->Push(sEluna->L);
else
sEluna->Push(sEluna->L, code);
sEluna->Push(sEluna->L, menuId);

View File

@@ -91,6 +91,7 @@ typedef std::set<std::string> LoadedScripts;
#define MAX_LOCALES MAX_LOCALE
#define OVERRIDE override
#define DIALOG_STATUS_SCRIPTED_NO_STATUS DIALOG_STATUS_UNDEFINED
#define TARGETICONCOUNT TARGET_ICON_COUNT
typedef TemporarySummon TempSummon;
#ifndef CLASSIC
#define PLAYER_FIELD_LIFETIME_HONORABLE_KILLS PLAYER_FIELD_LIFETIME_HONORBALE_KILLS

View File

@@ -142,8 +142,6 @@ ElunaRegister<Object> ObjectMethods[] =
{ "ToPlayer", &LuaObject::ToPlayer }, // :ToPlayer()
{ "ToCorpse", &LuaObject::ToCorpse }, // :ToCorpse()
{ "RemoveFlag", &LuaObject::RemoveFlag }, // :RemoveFlag(index, flag)
{ "RemoveUInt64Value", &LuaObject::RemoveUInt64Value }, // :RemoveUInt64Value(index, value)
{ "AddUInt64Value", &LuaObject::AddUInt64Value }, // :AddUInt64Value(index, value)
{ NULL, NULL },
};

View File

@@ -225,21 +225,5 @@ namespace LuaObject
sEluna->Push(L, obj->ToPlayer());
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

View File

@@ -2072,9 +2072,9 @@ namespace LuaPlayer
WorldPacket data(SMSG_MESSAGECHAT, 100);
data << uint8(channel);
data << int32(LANG_ADDON);
data << uint64(player->GetGUID());
data << uint64(player->GET_GUID());
data << uint32(0);
data << uint64(receiver->GetGUID());
data << uint64(receiver->GET_GUID());
data << uint32(fullmsg.length() + 1);
data << fullmsg;
data << uint8(0);

View File

@@ -1251,7 +1251,11 @@ namespace LuaUnit
return luaL_argerror(L, 3, "valid Language expected");
WorldPacket data;
#ifdef TRINITY
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);
return 0;
}