mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Propertly send SMSG_SET_PHASE_SHIFT to inform client about phase shift at phase change. Author: GriffonHeart
--HG-- branch : trunk
This commit is contained in:
@@ -217,6 +217,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ "ps", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePlaySound2Command, "", NULL },
|
||||
{ "scn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChannelNotifyCommand, "", NULL },
|
||||
{ "scm", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChatMsgCommand, "", NULL },
|
||||
{ "sps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendSetPhaseShiftCommand, "", NULL },
|
||||
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetItemState, "", NULL },
|
||||
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandlePlaySoundCommand, "", NULL },
|
||||
{ "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUpdate, "", NULL },
|
||||
|
||||
@@ -499,6 +499,7 @@ class ChatHandler
|
||||
bool HandleDebugBattlegroundCommand(const char * args);
|
||||
bool HandleSpawnVehicle(const char * args);
|
||||
bool HandleSendLargePacketCommand(const char * args);
|
||||
bool HandleSendSetPhaseShiftCommand(const char * args);
|
||||
|
||||
Player* getSelectedPlayer();
|
||||
Creature* getSelectedCreature();
|
||||
|
||||
@@ -649,3 +649,13 @@ bool ChatHandler::HandleSendLargePacketCommand(const char* args)
|
||||
SendSysMessage(ss.str().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSendSetPhaseShiftCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
||||
uint32 PhaseShift = atoi(args);
|
||||
m_session->SendSetPhaseShift(PhaseShift);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -6538,6 +6538,8 @@ void Aura::HandlePhase(bool apply, bool Real)
|
||||
// GM-mode have mask 0xFFFFFFFF
|
||||
if(!((Player*)m_target)->isGameMaster())
|
||||
m_target->SetPhaseMask(apply ? GetMiscValue() : PHASEMASK_NORMAL,false);
|
||||
|
||||
((Player*)m_target)->GetSession()->SendSetPhaseShift(apply ? GetMiscValue() : PHASEMASK_NORMAL);
|
||||
}
|
||||
else
|
||||
m_target->SetPhaseMask(apply ? GetMiscValue() : PHASEMASK_NORMAL,false);
|
||||
|
||||
@@ -477,6 +477,13 @@ void WorldSession::SendNotification(int32 string_id,...)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::SendSetPhaseShift(uint32 PhaseShift)
|
||||
{
|
||||
WorldPacket data(SMSG_SET_PHASE_SHIFT, 4);
|
||||
data << uint32(PhaseShift);
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
const char * WorldSession::GetTrinityString( int32 entry ) const
|
||||
{
|
||||
return objmgr.GetTrinityString(entry,GetSessionDbLocaleIndex());
|
||||
|
||||
@@ -101,6 +101,7 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void SendLfgResult(uint32 type, uint32 entry, uint8 lfg_type);
|
||||
void SendPartyResult(PartyOperation operation, const std::string& member, PartyResult res);
|
||||
void SendAreaTriggerMessage(const char* Text, ...) ATTR_PRINTF(2,3);
|
||||
void SendSetPhaseShift(uint32 phaseShift);
|
||||
|
||||
uint32 GetSecurity() const { return _security; }
|
||||
uint32 GetAccountId() const { return _accountId; }
|
||||
|
||||
Reference in New Issue
Block a user