Eluna implement SendShowMailbox for all cores

This commit is contained in:
Rochet2
2014-04-07 16:12:12 +03:00
committed by Foereaper
parent 6f6a9bb149
commit 389ed8a80e
2 changed files with 8 additions and 8 deletions

View File

@@ -667,9 +667,7 @@ ElunaRegister<Player> PlayerMethods[] =
{ "SendTaxiMenu", &LuaPlayer::SendTaxiMenu }, // :SendTaxiMenu(creature) - Sends flight window to player from creature
{ "RewardQuest", &LuaPlayer::RewardQuest }, // :RewardQuest(entry) - Gives quest rewards for the player
{ "SendAuctionMenu", &LuaPlayer::SendAuctionMenu }, // :SendAuctionMenu(unit) - Sends auction window to player. Auction house is sent by object.
#ifdef WOTLK
{ "SendMailMenu", &LuaPlayer::SendMailMenu }, // :SendMailMenu(object) - Sends mail window to player from gameobject
#endif
{ "SendShowMailBox", &LuaPlayer::SendShowMailBox }, // :SendShowMailBox([guid]) - Sends mail window to player. Sent by guid if provided (valid mailbox required for < wotlk)
{ "StartTaxi", &LuaPlayer::StartTaxi }, // :StartTaxi(pathId) - player starts the given flight path
{ "GossipSendPOI", &LuaPlayer::GossipSendPOI }, // :GossipSendPOI(X, Y, Icon, Flags, Data, Name) - Sends a point of interest to the player
{ "GossipAddQuests", &LuaPlayer::GossipAddQuests }, // :GossipAddQuests(unit) - Adds unit's quests to player's gossip menu

View File

@@ -1333,17 +1333,19 @@ namespace LuaPlayer
}
#endif
#ifdef WOTLK
int SendMailMenu(lua_State* L, Player* player)
int SendShowMailBox(lua_State* L, Player* player)
{
GameObject* object = sEluna->CHECKOBJ<GameObject>(L, 2);
uint64 guid = sEluna->CHECKVAL<uint64>(L, 2, player->GET_GUID());
#if (defined(CLASSIC) || defined(TBC))
WorldPacket data(SMSG_SHOW_MAILBOX, 8);
data << uint64(object->GetGUIDLow());
data << uint64(guid);
player->GetSession()->HandleGetMailList(data);
#else
player->GetSession()->SendShowMailBox(ObjectGuid(guid));
#endif
return 0;
}
#endif
#ifndef CATA
#ifndef CLASSIC