Scripts/Commands: Cleanup some output from .go instance
Port From (https://github.com/TrinityCore/TrinityCore/commit/c7e7c52c1a4ae79e049354d6ab406dfaad80d309)
This commit is contained in:
@@ -945,8 +945,8 @@ namespace Framework.Constants
|
|||||||
CommandInstanceNoExit = 1194,
|
CommandInstanceNoExit = 1194,
|
||||||
CommandWentToInstanceGate = 1195,
|
CommandWentToInstanceGate = 1195,
|
||||||
CommandWentToInstanceStart = 1196,
|
CommandWentToInstanceStart = 1196,
|
||||||
CommandGoInstanceFailed = 1197,
|
CommandGoInstanceGateFailed = 1197,
|
||||||
CommandGoInstanceStartFailed = 1198, // 3.3.5 RESERVED
|
CommandGoInstanceStartFailed = 1198,
|
||||||
// Room for more level 3 1199 not used
|
// Room for more level 3 1199 not used
|
||||||
|
|
||||||
// Debug Commands
|
// Debug Commands
|
||||||
|
|||||||
@@ -172,27 +172,34 @@ namespace Game.Chat.Commands
|
|||||||
|
|
||||||
// try going to entrance
|
// try going to entrance
|
||||||
AreaTriggerStruct exit = Global.ObjectMgr.GetGoBackTrigger(mapId);
|
AreaTriggerStruct exit = Global.ObjectMgr.GetGoBackTrigger(mapId);
|
||||||
if (exit == null)
|
if (exit != null)
|
||||||
handler.SendSysMessage(CypherStrings.CommandInstanceNoExit, mapId, scriptname);
|
|
||||||
|
|
||||||
if (exit != null && player.TeleportTo(exit.target_mapId, exit.target_X, exit.target_Y, exit.target_Z, exit.target_Orientation + MathF.PI))
|
|
||||||
{
|
{
|
||||||
handler.SendSysMessage(CypherStrings.CommandWentToInstanceGate, mapId, scriptname);
|
if (player.TeleportTo(exit.target_mapId, exit.target_X, exit.target_Y, exit.target_Z, exit.target_Orientation + MathF.PI))
|
||||||
return true;
|
{
|
||||||
|
handler.SendSysMessage(CypherStrings.CommandWentToInstanceGate, mapId, scriptname);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
handler.SendSysMessage(CypherStrings.CommandGoInstanceGateFailed, mapId, scriptname, exit.target_mapId);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
handler.SendSysMessage(CypherStrings.CommandInstanceNoExit, mapId, scriptname);
|
||||||
|
|
||||||
// try going to start
|
// try going to start
|
||||||
AreaTriggerStruct entrance = Global.ObjectMgr.GetMapEntranceTrigger(mapId);
|
AreaTriggerStruct entrance = Global.ObjectMgr.GetMapEntranceTrigger(mapId);
|
||||||
if (entrance == null)
|
if (entrance != null)
|
||||||
|
{
|
||||||
|
if (player.TeleportTo(entrance.target_mapId, entrance.target_X, entrance.target_Y, entrance.target_Z, entrance.target_Orientation))
|
||||||
|
{
|
||||||
|
handler.SendSysMessage(CypherStrings.CommandWentToInstanceStart, mapId, scriptname);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
handler.SendSysMessage(CypherStrings.CommandGoInstanceStartFailed, mapId, scriptname);
|
||||||
|
}
|
||||||
|
else
|
||||||
handler.SendSysMessage(CypherStrings.CommandInstanceNoEntrance, mapId, scriptname);
|
handler.SendSysMessage(CypherStrings.CommandInstanceNoEntrance, mapId, scriptname);
|
||||||
|
|
||||||
if (entrance != null && player.TeleportTo(entrance.target_mapId, entrance.target_X, entrance.target_Y, entrance.target_Z, entrance.target_Orientation))
|
|
||||||
{
|
|
||||||
handler.SendSysMessage(CypherStrings.CommandWentToInstanceStart, mapId, scriptname);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
handler.SendSysMessage(CypherStrings.CommandGoInstanceFailed, mapId, scriptname, exit != null ? exit.target_mapId : -1);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
UPDATE `trinity_string` SET `content_default`='Failed to teleport you to the entrance to mapid %u (%s) - are you maybe not attuned to/missing an expansion for parent map %u?' WHERE `entry`=1197;
|
||||||
|
DELETE FROM `trinity_string` WHERE `entry`=1198;
|
||||||
|
INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES (1198, 'Failed to teleport you to the start of mapid %u (%s) - are you maybe not attuned to/missing an expansion for the instance?');
|
||||||
Reference in New Issue
Block a user