mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Make .namego and .goname more flexible when summoning players to/from instances & BGs
--HG-- branch : trunk
This commit is contained in:
@@ -814,9 +814,10 @@ bool ChatHandler::HandleNamegoCommand(const char* args)
|
||||
// if both players are in different bgs
|
||||
else if (target->GetBattleGroundId() && m_session->GetPlayer()->GetBattleGroundId() != target->GetBattleGroundId())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG,nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
target->LeaveBattleground(false); // Note: should be changed so target gets no Deserter debuff
|
||||
//PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG,nameLink.c_str());
|
||||
//SetSentErrorMessage(true);
|
||||
//return false;
|
||||
}
|
||||
// all's well, set bg id
|
||||
// when porting out from the bg, it will be reset to 0
|
||||
@@ -829,10 +830,11 @@ bool ChatHandler::HandleNamegoCommand(const char* args)
|
||||
Map* cMap = target->GetMap();
|
||||
if (cMap->Instanceable() && cMap->GetInstanceId() != pMap->GetInstanceId())
|
||||
{
|
||||
target->UnbindInstance(pMap->GetInstanceId(), target->GetDifficulty(), true);
|
||||
// cannot summon from instance to instance
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST,nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
//PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST,nameLink.c_str());
|
||||
//SetSentErrorMessage(true);
|
||||
//return false;
|
||||
}
|
||||
|
||||
// we are in instance, and can summon only player in our group with us as lead
|
||||
@@ -929,9 +931,10 @@ bool ChatHandler::HandleGonameCommand(const char* args)
|
||||
// if both players are in different bgs
|
||||
else if (_player->GetBattleGroundId() && _player->GetBattleGroundId() != target->GetBattleGroundId())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG,chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
_player->LeaveBattleground(false); // Note: should be changed so _player gets no Deserter debuff
|
||||
//PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG,chrNameLink.c_str());
|
||||
//SetSentErrorMessage(true);
|
||||
//return false;
|
||||
}
|
||||
// all's well, set bg id
|
||||
// when porting out from the bg, it will be reset to 0
|
||||
|
||||
Reference in New Issue
Block a user