mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Fixed SMSG_TRANSFER_ABORT opcode
This commit is contained in:
parent
233e5eac6f
commit
002a2fc5fc
7 changed files with 33 additions and 23 deletions
|
|
@ -173,7 +173,8 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
||||||
//The player has a heroic mode and tries to enter into instance which has no a heroic mode
|
//The player has a heroic mode and tries to enter into instance which has no a heroic mode
|
||||||
if (!entry->SupportsHeroicMode() && player->GetDifficulty() == DIFFICULTY_HEROIC)
|
if (!entry->SupportsHeroicMode() && player->GetDifficulty() == DIFFICULTY_HEROIC)
|
||||||
{
|
{
|
||||||
player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY2); //Send aborted message
|
//Send aborted message
|
||||||
|
player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, DIFFICULTY_HEROIC);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1054,7 +1054,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
||||||
if(missingItem)
|
if(missingItem)
|
||||||
SendAreaTriggerMessage(GetMangosString(LANG_LEVEL_MINREQUIRED_AND_ITEM), at->requiredLevel, objmgr.GetItemPrototype(missingItem)->Name1);
|
SendAreaTriggerMessage(GetMangosString(LANG_LEVEL_MINREQUIRED_AND_ITEM), at->requiredLevel, objmgr.GetItemPrototype(missingItem)->Name1);
|
||||||
else if(missingKey)
|
else if(missingKey)
|
||||||
GetPlayer()->SendTransferAborted(at->target_mapId, TRANSFER_ABORT_DIFFICULTY2);
|
GetPlayer()->SendTransferAborted(at->target_mapId, TRANSFER_ABORT_DIFFICULTY, DIFFICULTY_HEROIC);
|
||||||
else if(missingQuest)
|
else if(missingQuest)
|
||||||
SendAreaTriggerMessage(at->requiredFailedText.c_str());
|
SendAreaTriggerMessage(at->requiredFailedText.c_str());
|
||||||
else if(missingLevel)
|
else if(missingLevel)
|
||||||
|
|
|
||||||
|
|
@ -1464,7 +1464,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||||
if(GetTransport())
|
if(GetTransport())
|
||||||
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
|
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
|
||||||
|
|
||||||
SendTransferAborted(mapid, TRANSFER_ABORT_INSUF_EXPAN_LVL1);
|
SendTransferAborted(mapid, TRANSFER_ABORT_INSUF_EXPAN_LVL, mEntry->Expansion());
|
||||||
|
|
||||||
return false; // normal client can't teleport to this map...
|
return false; // normal client can't teleport to this map...
|
||||||
}
|
}
|
||||||
|
|
@ -17521,11 +17521,19 @@ void Player::SendUpdateToOutOfRangeGroupMembers()
|
||||||
pet->ResetAuraUpdateMask();
|
pet->ResetAuraUpdateMask();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SendTransferAborted(uint32 mapid, uint16 reason)
|
void Player::SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_TRANSFER_ABORTED, 4+2);
|
WorldPacket data(SMSG_TRANSFER_ABORTED, 4+2);
|
||||||
data << uint32(mapid);
|
data << uint32(mapid);
|
||||||
data << uint16(reason); // transfer abort reason
|
data << uint8(reason); // transfer abort reason
|
||||||
|
switch(reason)
|
||||||
|
{
|
||||||
|
case TRANSFER_ABORT_INSUF_EXPAN_LVL:
|
||||||
|
case TRANSFER_ABORT_DIFFICULTY:
|
||||||
|
case TRANSFER_ABORT_UNIQUE_MESSAGE:
|
||||||
|
data << uint8(arg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -710,14 +710,15 @@ enum TradeSlots
|
||||||
|
|
||||||
enum TransferAbortReason
|
enum TransferAbortReason
|
||||||
{
|
{
|
||||||
TRANSFER_ABORT_MAX_PLAYERS = 0x0001, // Transfer Aborted: instance is full
|
TRANSFER_ABORT_ERROR = 0x00,
|
||||||
TRANSFER_ABORT_NOT_FOUND = 0x0002, // Transfer Aborted: instance not found
|
TRANSFER_ABORT_MAX_PLAYERS = 0x01, // Transfer Aborted: instance is full
|
||||||
TRANSFER_ABORT_TOO_MANY_INSTANCES = 0x0003, // You have entered too many instances recently.
|
TRANSFER_ABORT_NOT_FOUND = 0x02, // Transfer Aborted: instance not found
|
||||||
TRANSFER_ABORT_ZONE_IN_COMBAT = 0x0005, // Unable to zone in while an encounter is in progress.
|
TRANSFER_ABORT_TOO_MANY_INSTANCES = 0x03, // You have entered too many instances recently.
|
||||||
TRANSFER_ABORT_INSUF_EXPAN_LVL1 = 0x0106, // You must have TBC expansion installed to access this area.
|
TRANSFER_ABORT_ZONE_IN_COMBAT = 0x05, // Unable to zone in while an encounter is in progress.
|
||||||
TRANSFER_ABORT_DIFFICULTY1 = 0x0007, // Normal difficulty mode is not available for %s.
|
TRANSFER_ABORT_INSUF_EXPAN_LVL = 0x06, // You must have <TBC,WotLK> expansion installed to access this area.
|
||||||
TRANSFER_ABORT_DIFFICULTY2 = 0x0107, // Heroic difficulty mode is not available for %s.
|
TRANSFER_ABORT_DIFFICULTY = 0x07, // <Normal,Heroic,Epic> difficulty mode is not available for %s.
|
||||||
TRANSFER_ABORT_DIFFICULTY3 = 0x0207 // Epic difficulty mode is not available for %s.
|
TRANSFER_ABORT_UNIQUE_MESSAGE = 0x08, // Until you've escaped TLK's grasp, you cannot leave this place!
|
||||||
|
TRANSFER_ABORT_TOO_MANY_REALM_INSTANCES = 0x09 // Additional instances cannot be launched, please try again later.
|
||||||
};
|
};
|
||||||
|
|
||||||
enum InstanceResetWarningType
|
enum InstanceResetWarningType
|
||||||
|
|
@ -949,7 +950,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
|
|
||||||
void SendInitialPacketsBeforeAddToMap();
|
void SendInitialPacketsBeforeAddToMap();
|
||||||
void SendInitialPacketsAfterAddToMap();
|
void SendInitialPacketsAfterAddToMap();
|
||||||
void SendTransferAborted(uint32 mapid, uint16 reason);
|
void SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg = 0);
|
||||||
void SendInstanceResetWarning(uint32 mapid, uint32 time);
|
void SendInstanceResetWarning(uint32 mapid, uint32 time);
|
||||||
|
|
||||||
bool CanInteractWithNPCs(bool alive = true) const;
|
bool CanInteractWithNPCs(bool alive = true) const;
|
||||||
|
|
|
||||||
|
|
@ -713,7 +713,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||||
|
|
||||||
Field* fields = result->Fetch ();
|
Field* fields = result->Fetch ();
|
||||||
|
|
||||||
expansion = fields[8].GetUInt8 () && sWorld.getConfig (CONFIG_EXPANSION) > 0;
|
expansion = ((sWorld.getConfig(CONFIG_EXPANSION) > fields[8].GetUInt8()) ? fields[8].GetUInt8() : sWorld.getConfig(CONFIG_EXPANSION));
|
||||||
|
|
||||||
N.SetHexStr ("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
|
N.SetHexStr ("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
|
||||||
g.SetDword (7);
|
g.SetDword (7);
|
||||||
|
|
|
||||||
|
|
@ -148,9 +148,9 @@ bool ChatHandler::HandleSendOpcodeCommand(const char* args)
|
||||||
|
|
||||||
if(type == "uint8")
|
if(type == "uint8")
|
||||||
{
|
{
|
||||||
uint8 val1;
|
uint16 val1;
|
||||||
ifs >> val1;
|
ifs >> val1;
|
||||||
data << val1;
|
data << uint8(val1);
|
||||||
}
|
}
|
||||||
else if(type == "uint16")
|
else if(type == "uint16")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue