mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna implement SendShowMailbox for all cores
This commit is contained in:
@@ -667,9 +667,7 @@ ElunaRegister<Player> PlayerMethods[] =
|
|||||||
{ "SendTaxiMenu", &LuaPlayer::SendTaxiMenu }, // :SendTaxiMenu(creature) - Sends flight window to player from creature
|
{ "SendTaxiMenu", &LuaPlayer::SendTaxiMenu }, // :SendTaxiMenu(creature) - Sends flight window to player from creature
|
||||||
{ "RewardQuest", &LuaPlayer::RewardQuest }, // :RewardQuest(entry) - Gives quest rewards for the player
|
{ "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.
|
{ "SendAuctionMenu", &LuaPlayer::SendAuctionMenu }, // :SendAuctionMenu(unit) - Sends auction window to player. Auction house is sent by object.
|
||||||
#ifdef WOTLK
|
{ "SendShowMailBox", &LuaPlayer::SendShowMailBox }, // :SendShowMailBox([guid]) - Sends mail window to player. Sent by guid if provided (valid mailbox required for < wotlk)
|
||||||
{ "SendMailMenu", &LuaPlayer::SendMailMenu }, // :SendMailMenu(object) - Sends mail window to player from gameobject
|
|
||||||
#endif
|
|
||||||
{ "StartTaxi", &LuaPlayer::StartTaxi }, // :StartTaxi(pathId) - player starts the given flight path
|
{ "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
|
{ "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
|
{ "GossipAddQuests", &LuaPlayer::GossipAddQuests }, // :GossipAddQuests(unit) - Adds unit's quests to player's gossip menu
|
||||||
|
|||||||
@@ -1333,17 +1333,19 @@ namespace LuaPlayer
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WOTLK
|
int SendShowMailBox(lua_State* L, Player* player)
|
||||||
int SendMailMenu(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);
|
WorldPacket data(SMSG_SHOW_MAILBOX, 8);
|
||||||
data << uint64(object->GetGUIDLow());
|
data << uint64(guid);
|
||||||
player->GetSession()->HandleGetMailList(data);
|
player->GetSession()->HandleGetMailList(data);
|
||||||
|
#else
|
||||||
|
player->GetSession()->SendShowMailBox(ObjectGuid(guid));
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CATA
|
#ifndef CATA
|
||||||
#ifndef CLASSIC
|
#ifndef CLASSIC
|
||||||
|
|||||||
Reference in New Issue
Block a user