mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10314] Implement commands for work with areatriggers in game.
* all teleport commands support new areatrigger and areatriger-target shiftlinks
* .go trigger now let select areatrigger or areatrigger target as teleport point
* New commands:
.trigger - show detail info about areatrigger including all requirements
for teleport with shift-links to items/keys/quest
.trigger active - show all currently activated by character areatriggers
.trigger near - show near areatriggers
* .lookup item now show [usable] postfix if item can be used/equipped by selected character.
This commit is contained in:
parent
835efe7f6a
commit
685edfe7e2
12 changed files with 509 additions and 67 deletions
|
|
@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
|
|||
`version` varchar(120) default NULL,
|
||||
`creature_ai_version` varchar(120) default NULL,
|
||||
`cache_id` int(10) default '0',
|
||||
`required_10307_03_mangos_scripted_event_id` bit(1) default NULL
|
||||
`required_10314_02_mangos_command` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -567,7 +567,7 @@ INSERT INTO `command` VALUES
|
|||
('go grid',1,'Syntax: .go grid #gridX #gridY [#mapId]\r\n\r\nTeleport the gm to center of grid with provided indexes at map #mapId (or current map if it not provided).'),
|
||||
('go object',1,'Syntax: .go object (#gameobject_guid|$gameobject_name|id #gameobject_id)\r\nTeleport your character to gameobject with guid #gameobject_guid, or teleport your character to gameobject with name including as part $gameobject_name substring, or teleport your character to a gameobject that was spawned from the template with this entry #gameobject_id.'),
|
||||
('go taxinode',1,'Syntax: .go taxinode #taxinode\r\n\r\nTeleport player to taxinode coordinates. You can look up zone using .lookup taxinode $namepart'),
|
||||
('go trigger',1,'Syntax: .go trigger #trigger_id\r\n\r\nTeleport your character to areatrigger with id #trigger_id. Character will be teleported to trigger target if selected areatrigger is telporting trigger.'),
|
||||
('go trigger',1,'Syntax: .go trigger (#trigger_id|$trigger_shift-link|$trigger_target_shift-link) [target]\r\n\r\nTeleport your character to areatrigger with id #trigger_id or trigger id associated with shift-link. If additional arg "target" provided then character will telported to areatrigger target point.'),
|
||||
('go xy',1,'Syntax: .go xy #x #y [#mapid]\r\n\r\nTeleport player to point with (#x,#y) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'),
|
||||
('go xyz',1,'Syntax: .go xyz #x #y #z [#mapid]\r\n\r\nTeleport player to point with (#x,#y,#z) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'),
|
||||
('go zonexy',1,'Syntax: .go zonexy #x #y [#zone]\r\n\r\nTeleport player to point with (#x,#y) client coordinates at ground(water) level in zone #zoneid or current zone if #zoneid not provided. You can look up zone using .lookup area $namepart'),
|
||||
|
|
@ -763,6 +763,9 @@ INSERT INTO `command` VALUES
|
|||
('titles current',2,'Syntax: .titles current #title\r\nSet title #title (id or shift-link) as current selected titl for selected player. If title not in known title list for player then it will be added to list.'),
|
||||
('titles remove',2,'Syntax: .titles remove #title\r\nRemove title #title (id or shift-link) from known titles list for selected player.'),
|
||||
('titles setmask',2,'Syntax: .titles setmask #mask\r\n\r\nAllows user to use all titles from #mask.\r\n\r\n #mask=0 disables the title-choose-field'),
|
||||
('trigger',2,'Syntax: .trigger [#trigger_id|$trigger_shift-link|$trigger_target_shift-link]\r\n\r\nShow detail infor about areatrigger with id #trigger_id or trigger id associated with shift-link. If areatrigger id or shift-link not provided then selected nearest areatrigger at current map.'),
|
||||
('trigger active',2,'Syntax: .trigger active\r\n\r\nShow list of areatriggers wiht activation zone including current character position.'),
|
||||
('trigger near',2,'Syntax: .trigger near [#distance]\r\n\r\nOutput areatriggers at distance #distance from player. If #distance not provided use 10 as default value.'),
|
||||
('unaura',3,'Syntax: .unaura #spellid\r\n\r\nRemove aura due to spell #spellid from the selected Unit.'),
|
||||
('unban account',3,'Syntax: .unban account $Name\r\nUnban accounts for account name pattern.'),
|
||||
('unban character',3,'Syntax: .unban character $Name\r\nUnban accounts for character name pattern.'),
|
||||
|
|
@ -3270,6 +3273,21 @@ INSERT INTO `mangos_string` VALUES
|
|||
(354,'Title %u (%s) removed from known titles list for player %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(355,'Title %u (%s) set as current selected title for player %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(356,'Current selected title for player %s reset as not known now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(357,'Areatrigger %u not has target coordinates',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(358,'No areatriggers found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(359,'%s|cffffffff|Hareatrigger_target:%u|h[Trigger target %u]|h|r Map %u X:%f Y:%f Z:%f%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(360,'%s[Trigger target %u] Map %u X:%f Y:%f Z:%f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(361,'|cffffffff|Hareatrigger:%u|h[Trigger %u]|h|r Map %u X:%f Y:%f Z:%f%s%s%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(362,'[Trigger %u] Map %u X:%f Y:%f Z:%f%s%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(363,' (Dist %f)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(364,' [Tavern]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(365,' [Quest]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(366,'Explore quest:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(367,'Required level %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(368,'Required Items:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(369,'Required quest (normal difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(370,'Required heroic keys:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(371,'Required quest (heroic difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(400,'|cffff0000[System Message]:|rScripts reloaded',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(401,'You change security level of account %s to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(402,'%s changed your security level to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
|
|
@ -3381,7 +3399,7 @@ INSERT INTO `mangos_string` VALUES
|
|||
(509,'%d - sender: %s (guid: %u account: %u ) receiver: %s (guid: %u account: %u ) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(510,'%d - owner: %s (guid: %u account: %u ) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(511,'Wrong link type!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(512,'%d - |cffffffff|Hitem:%d:0:0:0:0:0:0:0:0|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(512,'%d - |cffffffff|Hitem:%d:0:0:0:0:0:0:0:0|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(513,'%d - |cffffffff|Hquest:%d:%d|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(514,'%d - |cffffffff|Hcreature_entry:%d|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(515,'%d%s - |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
|
|
@ -3652,7 +3670,7 @@ INSERT INTO `mangos_string` VALUES
|
|||
(1102,'Message sent to %s: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1103,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1104,'%d - %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1105,'%d - %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1105,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1106,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1107,'%d - %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1108,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
|
|
@ -3699,6 +3717,7 @@ INSERT INTO `mangos_string` VALUES
|
|||
(1149,' (Pool %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1150,' (Event %i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1151,' (Pool %u Event %i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1152,'[usable]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1200,'You try to view cinemitic %u but it doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1201,'You try to view movie %u but it doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
/*!40000 ALTER TABLE `mangos_string` ENABLE KEYS */;
|
||||
|
|
|
|||
23
sql/updates/10314_01_mangos_mangos_string.sql
Normal file
23
sql/updates/10314_01_mangos_mangos_string.sql
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10307_03_mangos_scripted_event_id required_10314_01_mangos_mangos_string bit;
|
||||
|
||||
DELETE FROM mangos_string WHERE entry IN (357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,512,1105,1152);
|
||||
|
||||
INSERT INTO mangos_string VALUES
|
||||
(357,'Areatrigger %u not has target coordinates',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(358,'No areatriggers found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(359,'%s|cffffffff|Hareatrigger_target:%u|h[Trigger target %u]|h|r Map %u X:%f Y:%f Z:%f%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(360,'%s[Trigger target %u] Map %u X:%f Y:%f Z:%f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(361,'|cffffffff|Hareatrigger:%u|h[Trigger %u]|h|r Map %u X:%f Y:%f Z:%f%s%s%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(362,'[Trigger %u] Map %u X:%f Y:%f Z:%f%s%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(363,' (Dist %f)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(364,' [Tavern]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(365,' [Quest]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(366,'Explore quest:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(367,'Required level %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(368,'Required Items:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(369,'Required quest (normal difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(370,'Required heroic keys:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(371,'Required quest (heroic difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(512,'%d - |cffffffff|Hitem:%d:0:0:0:0:0:0:0:0|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1105,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1152,'[usable]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
8
sql/updates/10314_02_mangos_command.sql
Normal file
8
sql/updates/10314_02_mangos_command.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10314_01_mangos_mangos_string required_10314_02_mangos_command bit;
|
||||
|
||||
DELETE FROM command WHERE name IN ('trigger','trigger active','trigger near','go trigger');
|
||||
INSERT INTO command (name, security, help) VALUES
|
||||
('go trigger',1,'Syntax: .go trigger (#trigger_id|$trigger_shift-link|$trigger_target_shift-link) [target]\r\n\r\nTeleport your character to areatrigger with id #trigger_id or trigger id associated with shift-link. If additional arg "target" provided then character will telported to areatrigger target point.'),
|
||||
('trigger',2,'Syntax: .trigger [#trigger_id|$trigger_shift-link|$trigger_target_shift-link]\r\n\r\nShow detail infor about areatrigger with id #trigger_id or trigger id associated with shift-link. If areatrigger id or shift-link not provided then selected nearest areatrigger at current map.'),
|
||||
('trigger active',2,'Syntax: .trigger active\r\n\r\nShow list of areatriggers wiht activation zone including current character position.'),
|
||||
('trigger near',2,'Syntax: .trigger near [#distance]\r\n\r\nOutput areatriggers at distance #distance from player. If #distance not provided use 10 as default value.');
|
||||
|
|
@ -66,6 +66,8 @@ pkgdata_DATA = \
|
|||
10307_03_mangos_scripted_event_id.sql \
|
||||
10312_01_characters_character_aura.sql \
|
||||
10312_02_characters_pet_aura.sql \
|
||||
10314_01_mangos_mangos_string.sql \
|
||||
10314_02_mangos_command.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -112,4 +114,6 @@ EXTRA_DIST = \
|
|||
10307_03_mangos_scripted_event_id.sql \
|
||||
10312_01_characters_character_aura.sql \
|
||||
10312_02_characters_pet_aura.sql \
|
||||
10314_01_mangos_mangos_string.sql \
|
||||
10314_02_mangos_command.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
|
||||
// - client, item icon shift click, not used in server currently
|
||||
// |color|Harea:area_id|h[name]|h|r
|
||||
// |color|Hareatrigger:id|h[name]|h|r
|
||||
// |color|Hareatrigger_target:id|h[name]|h|r
|
||||
// |color|Hcreature:creature_guid|h[name]|h|r
|
||||
// |color|Hcreature_entry:creature_id|h[name]|h|r
|
||||
// |color|Henchant:recipe_spell_id|h[prof_name: recipe_name]|h|r - client, at shift click in recipes list dialog
|
||||
|
|
@ -610,6 +612,14 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand triggerCommandTable[] =
|
||||
{
|
||||
{ "active", SEC_GAMEMASTER, false, &ChatHandler::HandleTriggerActiveCommand, "", NULL },
|
||||
{ "near", SEC_GAMEMASTER, false, &ChatHandler::HandleTriggerNearCommand, "", NULL },
|
||||
{ "", SEC_GAMEMASTER, true, &ChatHandler::HandleTriggerCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand unbanCommandTable[] =
|
||||
{
|
||||
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanAccountCommand, "", NULL },
|
||||
|
|
@ -654,6 +664,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "server", SEC_PLAYER, true, NULL, "", serverCommandTable },
|
||||
{ "tele", SEC_MODERATOR, true, NULL, "", teleCommandTable },
|
||||
{ "titles", SEC_GAMEMASTER, false, NULL, "", titlesCommandTable },
|
||||
{ "trigger", SEC_GAMEMASTER, false, NULL, "", triggerCommandTable },
|
||||
{ "wp", SEC_GAMEMASTER, false, NULL, "", wpCommandTable },
|
||||
|
||||
{ "aura", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAuraCommand, "", NULL },
|
||||
|
|
@ -2285,7 +2296,9 @@ enum LocationLinkType
|
|||
LOCATION_LINK_CREATURE = 3,
|
||||
LOCATION_LINK_GAMEOBJECT = 4,
|
||||
LOCATION_LINK_CREATURE_ENTRY = 5,
|
||||
LOCATION_LINK_GAMEOBJECT_ENTRY = 6
|
||||
LOCATION_LINK_GAMEOBJECT_ENTRY = 6,
|
||||
LOCATION_LINK_AREATRIGGER = 7,
|
||||
LOCATION_LINK_AREATRIGGER_TARGET= 8,
|
||||
};
|
||||
|
||||
static char const* const locationKeys[] =
|
||||
|
|
@ -2297,6 +2310,8 @@ static char const* const locationKeys[] =
|
|||
"Hgameobject",
|
||||
"Hcreature_entry",
|
||||
"Hgameobject_entry",
|
||||
"Hareatrigger",
|
||||
"Hareatrigger_target",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -2311,6 +2326,8 @@ bool ChatHandler::extractLocationFromLink(char* text, uint32& mapid, float& x, f
|
|||
// |color|Hgameobject:go_guid|h[name]|h|r
|
||||
// |color|Hcreature_entry:creature_id|h[name]|h|r
|
||||
// |color|Hgameobject_entry:go_id|h[name]|h|r
|
||||
// |color|Hareatrigger:id|h[name]|h|r
|
||||
// |color|Hareatrigger_target:id|h[name]|h|r
|
||||
char* idS = extractKeyFromLink(text,locationKeys,&type);
|
||||
if(!idS)
|
||||
return false;
|
||||
|
|
@ -2449,6 +2466,49 @@ bool ChatHandler::extractLocationFromLink(char* text, uint32& mapid, float& x, f
|
|||
else
|
||||
return false;
|
||||
}
|
||||
case LOCATION_LINK_AREATRIGGER:
|
||||
{
|
||||
uint32 id = (uint32)atol(idS);
|
||||
|
||||
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(id);
|
||||
if (!atEntry)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
mapid = atEntry->mapid;
|
||||
x = atEntry->x;
|
||||
y = atEntry->y;
|
||||
z = atEntry->z;
|
||||
return true;
|
||||
}
|
||||
case LOCATION_LINK_AREATRIGGER_TARGET:
|
||||
{
|
||||
uint32 id = (uint32)atol(idS);
|
||||
|
||||
if (!sAreaTriggerStore.LookupEntry(id))
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
AreaTrigger const* at = sObjectMgr.GetAreaTrigger(id);
|
||||
if(!at)
|
||||
{
|
||||
PSendSysMessage(LANG_AREATRIGER_NOT_HAS_TARGET, id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
mapid = at->target_mapId;
|
||||
x = at->target_X;
|
||||
y = at->target_Y;
|
||||
z = at->target_Z;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// unknown type?
|
||||
|
|
|
|||
|
|
@ -262,6 +262,8 @@ class ChatHandler
|
|||
bool HandleLookupPlayerAccountCommand(const char* args);
|
||||
bool HandleLookupPlayerEmailCommand(const char* args);
|
||||
bool HandleLookupQuestCommand(const char* args);
|
||||
|
||||
void ShowQuestListHelper(uint32 questId, int32 loc_idx, Player* target = NULL);
|
||||
bool HandleLookupSkillCommand(const char* args);
|
||||
bool HandleLookupSpellCommand(const char* args);
|
||||
bool HandleLookupTaxiNodeCommand(const char * args);
|
||||
|
|
@ -462,6 +464,10 @@ class ChatHandler
|
|||
bool HandleTitlesRemoveCommand(const char* args);
|
||||
bool HandleTitlesSetMaskCommand(const char* args);
|
||||
|
||||
bool HandleTriggerActiveCommand(const char* args);
|
||||
bool HandleTriggerNearCommand(const char* args);
|
||||
bool HandleTriggerCommand(const char* args);
|
||||
|
||||
bool HandleUnBanAccountCommand(const char* args);
|
||||
bool HandleUnBanCharacterCommand(const char* args);
|
||||
bool HandleUnBanIPCommand(const char* args);
|
||||
|
|
@ -569,6 +575,9 @@ class ChatHandler
|
|||
void ShowTicket(uint64 guid, char const* text, char const* time);
|
||||
bool ShowAccountListHelper(QueryResult* result, uint32* limit = NULL, bool title = true, bool error = true);
|
||||
bool ShowPlayerListHelper(QueryResult* result, uint32* limit = NULL, bool title = true, bool error = true);
|
||||
void ShowItemListHelper(uint32 itemId, int loc_idx, Player* target = NULL);
|
||||
void ShowTriggerListHelper(AreaTriggerEntry const * atEntry);
|
||||
void ShowTriggerTargetListHelper(uint32 id, AreaTrigger const* at, bool subpart = false);
|
||||
bool LookupPlayerSearchCommand(QueryResult* result, uint32* limit = NULL);
|
||||
bool HandleBanListHelper(QueryResult* result);
|
||||
bool HandleBanHelper(BanMode mode,char const* args);
|
||||
|
|
|
|||
|
|
@ -345,7 +345,22 @@ enum MangosStrings
|
|||
LANG_TITLE_REMOVE_RES = 354,
|
||||
LANG_TITLE_CURRENT_RES = 355,
|
||||
LANG_CURRENT_TITLE_RESET = 356,
|
||||
// Room for more level 2 357-399 not used
|
||||
LANG_AREATRIGER_NOT_HAS_TARGET = 357,
|
||||
LANG_COMMAND_NOTRIGGERFOUND = 358,
|
||||
LANG_TRIGGER_TARGET_LIST_CHAT = 359,
|
||||
LANG_TRIGGER_TARGET_LIST_CONSOLE = 360,
|
||||
LANG_TRIGGER_LIST_CHAT = 361,
|
||||
LANG_TRIGGER_LIST_CONSOLE = 362,
|
||||
LANG_TRIGGER_DIST = 363,
|
||||
LANG_TRIGGER_TAVERN = 364,
|
||||
LANG_TRIGGER_QUEST = 365,
|
||||
LANG_TRIGGER_EXPLORE_QUEST = 366,
|
||||
LANG_TRIGGER_REQ_LEVEL = 367,
|
||||
LANG_TRIGGER_REQ_ITEMS = 368,
|
||||
LANG_TRIGGER_REQ_QUEST_NORMAL = 369,
|
||||
LANG_TRIGGER_REQ_KEYS_HEROIC = 370,
|
||||
LANG_TRIGGER_REQ_QUEST_HEROIC = 371,
|
||||
// Room for more level 2 372-399 not used
|
||||
|
||||
// level 3 chat
|
||||
LANG_SCRIPTS_RELOADED = 400,
|
||||
|
|
@ -852,7 +867,8 @@ enum MangosStrings
|
|||
LANG_NPC_GO_INFO_POOL_STRING = 1149,
|
||||
LANG_NPC_GO_INFO_EVENT_STRING = 1150,
|
||||
LANG_NPC_GO_INFO_POOL_EVENT_STRING = 1151,
|
||||
// Room for more level 3 1152-1199 not used
|
||||
LANG_COMMAND_ITEM_USABLE = 1152,
|
||||
// Room for more level 3 1153-1199 not used
|
||||
|
||||
// Debug commands
|
||||
LANG_CINEMATIC_NOT_EXIST = 1200,
|
||||
|
|
|
|||
|
|
@ -141,6 +141,263 @@ bool ChatHandler::HandleUnmuteCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ChatHandler::ShowTriggerTargetListHelper( uint32 id, AreaTrigger const* at, bool subpart /*= false*/ )
|
||||
{
|
||||
if (m_session)
|
||||
{
|
||||
char dist_buf[50];
|
||||
if(!subpart)
|
||||
{
|
||||
float dist = m_session->GetPlayer()->GetDistance2d(at->target_X, at->target_Y);
|
||||
snprintf(dist_buf, 50, GetMangosString(LANG_TRIGGER_DIST), dist);
|
||||
}
|
||||
else
|
||||
dist_buf[0] = '\0';
|
||||
|
||||
PSendSysMessage(LANG_TRIGGER_TARGET_LIST_CHAT,
|
||||
subpart ? " -> " : "", id, id, at->target_mapId, at->target_X, at->target_Y, at->target_Z, dist_buf);
|
||||
}
|
||||
else
|
||||
PSendSysMessage(LANG_TRIGGER_TARGET_LIST_CONSOLE,
|
||||
subpart ? " -> " : "", id, at->target_mapId, at->target_X, at->target_Y, at->target_Z);
|
||||
}
|
||||
|
||||
void ChatHandler::ShowTriggerListHelper( AreaTriggerEntry const * atEntry )
|
||||
{
|
||||
|
||||
char const* tavern = sObjectMgr.IsTavernAreaTrigger(atEntry->id) ? GetMangosString(LANG_TRIGGER_TAVERN) : "";
|
||||
char const* quest = sObjectMgr.GetQuestForAreaTrigger(atEntry->id) ? GetMangosString(LANG_TRIGGER_QUEST) : "";
|
||||
|
||||
if (m_session)
|
||||
{
|
||||
float dist = m_session->GetPlayer()->GetDistance2d(atEntry->x, atEntry->y);
|
||||
char dist_buf[50];
|
||||
snprintf(dist_buf, 50, GetMangosString(LANG_TRIGGER_DIST), dist);
|
||||
|
||||
PSendSysMessage(LANG_TRIGGER_LIST_CHAT,
|
||||
atEntry->id, atEntry->id, atEntry->mapid, atEntry->x, atEntry->y, atEntry->z, dist_buf, tavern, quest);
|
||||
}
|
||||
else
|
||||
PSendSysMessage(LANG_TRIGGER_LIST_CONSOLE,
|
||||
atEntry->id, atEntry->mapid, atEntry->x, atEntry->y, atEntry->z, tavern, quest);
|
||||
|
||||
if (AreaTrigger const* at = sObjectMgr.GetAreaTrigger(atEntry->id))
|
||||
ShowTriggerTargetListHelper(atEntry->id, at, true);
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleTriggerCommand(const char* args)
|
||||
{
|
||||
AreaTriggerEntry const* atEntry = NULL;
|
||||
|
||||
Player* pl = m_session ? m_session->GetPlayer() : NULL;
|
||||
|
||||
// select by args
|
||||
if (*args)
|
||||
{
|
||||
char *atId = extractKeyFromLink((char*)args, "Hareatrigger");
|
||||
if (!atId)
|
||||
return false;
|
||||
|
||||
int32 i_atId = atoi(atId);
|
||||
|
||||
if (!i_atId)
|
||||
return false;
|
||||
|
||||
atEntry = sAreaTriggerStore.LookupEntry(i_atId);
|
||||
|
||||
if (!atEntry)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, i_atId);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// find nearest
|
||||
else
|
||||
{
|
||||
if (!m_session)
|
||||
return false;
|
||||
|
||||
float dist2 = MAP_SIZE*MAP_SIZE;
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
|
||||
// Search triggers
|
||||
for (uint32 id = 0; id < sAreaTriggerStore.GetNumRows (); ++id)
|
||||
{
|
||||
AreaTriggerEntry const *atTestEntry = sAreaTriggerStore.LookupEntry (id);
|
||||
if (!atTestEntry)
|
||||
continue;
|
||||
|
||||
if (atTestEntry->mapid != m_session->GetPlayer()->GetMapId())
|
||||
continue;
|
||||
|
||||
float dx = atTestEntry->x - pl->GetPositionX();
|
||||
float dy = atTestEntry->y - pl->GetPositionY();
|
||||
|
||||
float test_dist2 = dx*dx + dy*dy;
|
||||
|
||||
if (test_dist2 >= dist2)
|
||||
continue;
|
||||
|
||||
dist2 = test_dist2;
|
||||
atEntry = atTestEntry;
|
||||
}
|
||||
|
||||
if (!atEntry)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_NOTRIGGERFOUND);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ShowTriggerListHelper(atEntry);
|
||||
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
|
||||
AreaTrigger const* at = sObjectMgr.GetAreaTrigger(atEntry->id);
|
||||
if (at)
|
||||
PSendSysMessage(LANG_TRIGGER_REQ_LEVEL, at->requiredLevel);
|
||||
|
||||
if (uint32 quest_id = sObjectMgr.GetQuestForAreaTrigger(atEntry->id))
|
||||
{
|
||||
SendSysMessage(LANG_TRIGGER_EXPLORE_QUEST);
|
||||
ShowQuestListHelper(quest_id, loc_idx, pl);
|
||||
}
|
||||
|
||||
if (at)
|
||||
{
|
||||
if (at->requiredItem || at->requiredItem2)
|
||||
{
|
||||
SendSysMessage(LANG_TRIGGER_REQ_ITEMS);
|
||||
|
||||
if (at->requiredItem)
|
||||
ShowItemListHelper(at->requiredItem, loc_idx, pl);
|
||||
if (at->requiredItem2)
|
||||
ShowItemListHelper(at->requiredItem2, loc_idx, pl);
|
||||
}
|
||||
|
||||
if (at->requiredQuest)
|
||||
{
|
||||
SendSysMessage(LANG_TRIGGER_REQ_QUEST_NORMAL);
|
||||
ShowQuestListHelper(at->requiredQuest, loc_idx, pl);
|
||||
}
|
||||
|
||||
if (at->heroicKey || at->heroicKey2)
|
||||
{
|
||||
SendSysMessage(LANG_TRIGGER_REQ_KEYS_HEROIC);
|
||||
|
||||
if (at->heroicKey)
|
||||
ShowItemListHelper(at->heroicKey, loc_idx, pl);
|
||||
if (at->heroicKey2)
|
||||
ShowItemListHelper(at->heroicKey2, loc_idx, pl);
|
||||
}
|
||||
|
||||
if (at->requiredQuestHeroic)
|
||||
{
|
||||
SendSysMessage(LANG_TRIGGER_REQ_QUEST_HEROIC);
|
||||
ShowQuestListHelper(at->requiredQuestHeroic, loc_idx, pl);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleTriggerActiveCommand(const char* args)
|
||||
{
|
||||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
|
||||
// Search in AreaTable.dbc
|
||||
for (uint32 id = 0; id < sAreaTriggerStore.GetNumRows (); ++id)
|
||||
{
|
||||
AreaTriggerEntry const *atEntry = sAreaTriggerStore.LookupEntry (id);
|
||||
if (!atEntry)
|
||||
continue;
|
||||
|
||||
if (!IsPointInAreaTriggerZone(atEntry, pl->GetMapId(), pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ()))
|
||||
continue;
|
||||
|
||||
ShowTriggerListHelper(atEntry);
|
||||
|
||||
++counter;
|
||||
}
|
||||
|
||||
if (counter == 0) // if counter == 0 then we found nth
|
||||
SendSysMessage (LANG_COMMAND_NOTRIGGERFOUND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleTriggerNearCommand(const char* args)
|
||||
{
|
||||
float distance = (!*args) ? 10.0f : (float)atof(args);
|
||||
float dist2 = distance*distance;
|
||||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
|
||||
// Search triggers
|
||||
for (uint32 id = 0; id < sAreaTriggerStore.GetNumRows (); ++id)
|
||||
{
|
||||
AreaTriggerEntry const *atEntry = sAreaTriggerStore.LookupEntry (id);
|
||||
if (!atEntry)
|
||||
continue;
|
||||
|
||||
if (atEntry->mapid != m_session->GetPlayer()->GetMapId())
|
||||
continue;
|
||||
|
||||
float dx = atEntry->x - pl->GetPositionX();
|
||||
float dy = atEntry->y - pl->GetPositionY();
|
||||
|
||||
if (dx*dx + dy*dy > dist2)
|
||||
continue;
|
||||
|
||||
ShowTriggerListHelper(atEntry);
|
||||
|
||||
++counter;
|
||||
}
|
||||
|
||||
// Search trigger targets
|
||||
for (uint32 id = 0; id < sAreaTriggerStore.GetNumRows (); ++id)
|
||||
{
|
||||
AreaTriggerEntry const *atEntry = sAreaTriggerStore.LookupEntry (id);
|
||||
if (!atEntry)
|
||||
continue;
|
||||
|
||||
AreaTrigger const* at = sObjectMgr.GetAreaTrigger(atEntry->id);
|
||||
if (!at)
|
||||
continue;
|
||||
|
||||
if (at->target_mapId != m_session->GetPlayer()->GetMapId())
|
||||
continue;
|
||||
|
||||
float dx = at->target_X - pl->GetPositionX();
|
||||
float dy = at->target_Y - pl->GetPositionY();
|
||||
|
||||
if (dx*dx + dy*dy > dist2)
|
||||
continue;
|
||||
|
||||
ShowTriggerTargetListHelper(atEntry->id, at);
|
||||
|
||||
++counter;
|
||||
}
|
||||
|
||||
if (counter == 0) // if counter == 0 then we found nth
|
||||
SendSysMessage (LANG_COMMAND_NOTRIGGERFOUND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static char const* const areatriggerKeys[] =
|
||||
{
|
||||
"Hareatrigger",
|
||||
"Hareatrigger_target",
|
||||
NULL
|
||||
};
|
||||
|
||||
bool ChatHandler::HandleGoTriggerCommand(const char* args)
|
||||
{
|
||||
Player* _player = m_session->GetPlayer();
|
||||
|
|
@ -148,7 +405,9 @@ bool ChatHandler::HandleGoTriggerCommand(const char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
char *atId = strtok((char*)args, " ");
|
||||
int keyIdx; // not index
|
||||
|
||||
char *atId = extractKeyFromLink((char*)args, areatriggerKeys, &keyIdx);
|
||||
if (!atId)
|
||||
return false;
|
||||
|
||||
|
|
@ -157,15 +416,36 @@ bool ChatHandler::HandleGoTriggerCommand(const char* args)
|
|||
if (!i_atId)
|
||||
return false;
|
||||
|
||||
AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(i_atId);
|
||||
if (!at)
|
||||
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(i_atId);
|
||||
if (!atEntry)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND,i_atId);
|
||||
PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, i_atId);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
return HandleGoHelper(_player, at->mapid, at->x, at->y, &at->z);
|
||||
char* target_str = strtok(NULL, " ");
|
||||
if (target_str)
|
||||
{
|
||||
int l = strlen(target_str);
|
||||
if (strncmp(target_str, "target", l) != 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target_str != NULL)
|
||||
{
|
||||
AreaTrigger const* at = sObjectMgr.GetAreaTrigger(i_atId);
|
||||
if (!at)
|
||||
{
|
||||
PSendSysMessage(LANG_AREATRIGER_NOT_HAS_TARGET, i_atId);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
return HandleGoHelper(_player, at->target_mapId, at->target_X, at->target_Y, &at->target_Z);
|
||||
}
|
||||
else
|
||||
return HandleGoHelper(_player, atEntry->mapid, atEntry->x, atEntry->y, &atEntry->z);
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGoGraveyardCommand(const char* args)
|
||||
|
|
|
|||
|
|
@ -2634,6 +2634,35 @@ bool ChatHandler::HandleListCreatureCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ChatHandler::ShowItemListHelper( uint32 itemId, int loc_idx, Player* target /*=NULL*/ )
|
||||
{
|
||||
ItemPrototype const *itemProto = sItemStorage.LookupEntry<ItemPrototype >(itemId);
|
||||
if(!itemProto)
|
||||
return;
|
||||
|
||||
std::string name;
|
||||
|
||||
if(ItemLocale const *il = loc_idx >= 0 ? sObjectMgr.GetItemLocale(itemProto->ItemId) : NULL)
|
||||
name = il->Name[loc_idx];
|
||||
|
||||
if (name.empty())
|
||||
name = itemProto->Name1;
|
||||
|
||||
char const* usableStr = "";
|
||||
|
||||
if (target)
|
||||
{
|
||||
if (target->CanUseItem(itemProto))
|
||||
usableStr = GetMangosString(LANG_COMMAND_ITEM_USABLE);
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_ITEM_LIST_CHAT, itemId, itemId, name.c_str(), usableStr);
|
||||
else
|
||||
PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemId, name.c_str(), usableStr);
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleLookupItemCommand(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
|
|
@ -2648,6 +2677,8 @@ bool ChatHandler::HandleLookupItemCommand(const char* args)
|
|||
|
||||
wstrToLower(wnamepart);
|
||||
|
||||
Player* pl = m_session ? m_session->GetPlayer() : NULL;
|
||||
|
||||
uint32 counter = 0;
|
||||
|
||||
// Search in `item_template`
|
||||
|
|
@ -2669,10 +2700,7 @@ bool ChatHandler::HandleLookupItemCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_ITEM_LIST_CHAT, id, id, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_ITEM_LIST_CONSOLE, id, name.c_str());
|
||||
ShowItemListHelper(pProto->ItemId, loc_idx, pl);
|
||||
++counter;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2686,10 +2714,7 @@ bool ChatHandler::HandleLookupItemCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_ITEM_LIST_CHAT, id, id, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_ITEM_LIST_CONSOLE, id, name.c_str());
|
||||
ShowItemListHelper(pProto->ItemId, -1, pl);
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -2944,6 +2969,44 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ChatHandler::ShowQuestListHelper( uint32 questId, int32 loc_idx, Player* target /*= NULL*/ )
|
||||
{
|
||||
Quest const* qinfo = sObjectMgr.GetQuestTemplate(questId);
|
||||
if (!qinfo)
|
||||
return;
|
||||
|
||||
std::string title;
|
||||
|
||||
if (QuestLocale const *il = loc_idx >= 0 ? sObjectMgr.GetQuestLocale(qinfo->GetQuestId()) : NULL)
|
||||
title = il->Title[loc_idx];
|
||||
|
||||
if (title.empty())
|
||||
title = qinfo->GetTitle();
|
||||
|
||||
char const* statusStr = "";
|
||||
|
||||
if (target)
|
||||
{
|
||||
QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
|
||||
|
||||
if (status == QUEST_STATUS_COMPLETE)
|
||||
{
|
||||
if (target->GetQuestRewardStatus(qinfo->GetQuestId()))
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_REWARDED);
|
||||
else
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_COMPLETE);
|
||||
}
|
||||
else if (status == QUEST_STATUS_INCOMPLETE)
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_ACTIVE);
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT, qinfo->GetQuestId(), qinfo->GetQuestId(), qinfo->GetQuestLevel(), title.c_str(), statusStr);
|
||||
else
|
||||
PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qinfo->GetQuestId(), title.c_str(), statusStr);
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
|
|
@ -2980,27 +3043,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(title, wnamepart))
|
||||
{
|
||||
char const* statusStr = "";
|
||||
|
||||
if(target)
|
||||
{
|
||||
QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
|
||||
|
||||
if(status == QUEST_STATUS_COMPLETE)
|
||||
{
|
||||
if(target->GetQuestRewardStatus(qinfo->GetQuestId()))
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_REWARDED);
|
||||
else
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_COMPLETE);
|
||||
}
|
||||
else if(status == QUEST_STATUS_INCOMPLETE)
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_ACTIVE);
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),qinfo->GetQuestLevel(),title.c_str(),statusStr);
|
||||
else
|
||||
PSendSysMessage(LANG_QUEST_LIST_CONSOLE,qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
ShowQuestListHelper(qinfo->GetQuestId(), loc_idx, target);
|
||||
++counter;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -3014,28 +3057,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(title, wnamepart))
|
||||
{
|
||||
char const* statusStr = "";
|
||||
|
||||
if(target)
|
||||
{
|
||||
QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
|
||||
|
||||
if(status == QUEST_STATUS_COMPLETE)
|
||||
{
|
||||
if(target->GetQuestRewardStatus(qinfo->GetQuestId()))
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_REWARDED);
|
||||
else
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_COMPLETE);
|
||||
}
|
||||
else if(status == QUEST_STATUS_INCOMPLETE)
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_ACTIVE);
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),qinfo->GetQuestLevel(),title.c_str(),statusStr);
|
||||
else
|
||||
PSendSysMessage(LANG_QUEST_LIST_CONSOLE,qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
|
||||
ShowQuestListHelper(qinfo->GetQuestId(), -1, target);
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -722,10 +722,11 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
|||
}
|
||||
|
||||
// enter to tavern, not overwrite city rest
|
||||
if(sObjectMgr.IsTavernAreaTrigger(Trigger_ID) && pl->GetRestType() != REST_TYPE_IN_CITY)
|
||||
if(sObjectMgr.IsTavernAreaTrigger(Trigger_ID))
|
||||
{
|
||||
// set resting flag we are in the inn
|
||||
pl->SetRestType(REST_TYPE_IN_TAVERN, Trigger_ID);
|
||||
if (pl->GetRestType() != REST_TYPE_IN_CITY)
|
||||
pl->SetRestType(REST_TYPE_IN_TAVERN, Trigger_ID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10313"
|
||||
#define REVISION_NR "10314"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef __REVISION_SQL_H__
|
||||
#define __REVISION_SQL_H__
|
||||
#define REVISION_DB_CHARACTERS "required_10312_02_characters_pet_aura"
|
||||
#define REVISION_DB_MANGOS "required_10307_03_mangos_scripted_event_id"
|
||||
#define REVISION_DB_MANGOS "required_10314_02_mangos_command"
|
||||
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
|
||||
#endif // __REVISION_SQL_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue