mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[sql/updates/2008_10_22_02_mangos_mangos_string.sql] Allow use in console .event/.reload/.lookup/.list (some)/.guild (some) subcommands.
This commit is contained in:
parent
4e889c1b41
commit
b10349a737
10 changed files with 484 additions and 364 deletions
|
|
@ -2637,7 +2637,16 @@ INSERT INTO `mangos_string` VALUES
|
|||
(1011,'|<Error> | %20s |<Error> |<Er>|<Err>|',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1100,'Account %s (Id: %u) have up to %u expansion allowed now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1101,'Message of the day changed to:\r\n%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1102,'Message sent to %s: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
(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),
|
||||
(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),
|
||||
(1109,'%d - %s %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1110,'%d - %s X:%f Y:%f Z:%f MapId:%d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1111,'%d - %s X:%f Y:%f Z:%f MapId:%d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
/*!40000 ALTER TABLE `mangos_string` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
|
|
|||
12
sql/updates/2008_10_22_02_mangos_mangos_string.sql
Normal file
12
sql/updates/2008_10_22_02_mangos_mangos_string.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
DELETE FROM mangos_string WHERE entry IN (1103,1104,1105,1106,1107,1108,1109,1110,1111);
|
||||
|
||||
INSERT INTO mangos_string VALUES
|
||||
(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),
|
||||
(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),
|
||||
(1109,'%d - %s %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1110,'%d - %s X:%f Y:%f Z:%f MapId:%d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(1111,'%d - %s X:%f Y:%f Z:%f MapId:%d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
|
|
@ -100,6 +100,7 @@ pkgdata_DATA = \
|
|||
2008_10_21_02_mangos_command.sql \
|
||||
2008_10_21_03_mangos_command.sql \
|
||||
2008_10_22_01_mangos_quest_template.sql \
|
||||
2008_10_22_02_mangos_mangos_string.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -181,4 +182,5 @@ EXTRA_DIST = \
|
|||
2008_10_21_02_mangos_command.sql \
|
||||
2008_10_21_03_mangos_command.sql \
|
||||
2008_10_22_01_mangos_quest_template.sql \
|
||||
2008_10_22_02_mangos_mangos_string.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -173,10 +173,10 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
|
||||
static ChatCommand eventCommandTable[] =
|
||||
{
|
||||
{ "activelist", SEC_GAMEMASTER, false, &ChatHandler::HandleEventActiveListCommand, "", NULL },
|
||||
{ "start", SEC_GAMEMASTER, false, &ChatHandler::HandleEventStartCommand, "", NULL },
|
||||
{ "stop", SEC_GAMEMASTER, false, &ChatHandler::HandleEventStopCommand, "", NULL },
|
||||
{ "", SEC_GAMEMASTER, false, &ChatHandler::HandleEventInfoCommand, "", NULL },
|
||||
{ "activelist", SEC_GAMEMASTER, true, &ChatHandler::HandleEventActiveListCommand, "", NULL },
|
||||
{ "start", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStartCommand, "", NULL },
|
||||
{ "stop", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStopCommand, "", NULL },
|
||||
{ "", SEC_GAMEMASTER, true, &ChatHandler::HandleEventInfoCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
|
@ -197,70 +197,70 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
|
||||
static ChatCommand reloadCommandTable[] =
|
||||
{
|
||||
{ "all", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllCommand, "", NULL },
|
||||
{ "all_loot", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllLootCommand, "", NULL },
|
||||
{ "all_npc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllNpcCommand, "", NULL },
|
||||
{ "all_quest", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllQuestCommand, "", NULL },
|
||||
{ "all_scripts", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllScriptsCommand, "", NULL },
|
||||
{ "all_spell", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllSpellCommand, "", NULL },
|
||||
{ "all_item", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllItemCommand, "", NULL },
|
||||
{ "all_locales", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllLocalesCommand, "", NULL },
|
||||
{ "all", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllCommand, "", NULL },
|
||||
{ "all_loot", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllLootCommand, "", NULL },
|
||||
{ "all_npc", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllNpcCommand, "", NULL },
|
||||
{ "all_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllQuestCommand, "", NULL },
|
||||
{ "all_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllScriptsCommand, "", NULL },
|
||||
{ "all_spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllSpellCommand, "", NULL },
|
||||
{ "all_item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllItemCommand, "", NULL },
|
||||
{ "all_locales", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllLocalesCommand, "", NULL },
|
||||
|
||||
{ "config", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadConfigCommand, "", NULL },
|
||||
{ "config", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadConfigCommand, "", NULL },
|
||||
|
||||
{ "areatrigger_tavern", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAreaTriggerTavernCommand, "", NULL },
|
||||
{ "areatrigger_teleport", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAreaTriggerTeleportCommand, "", NULL },
|
||||
{ "areatrigger_involvedrelation",SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadQuestAreaTriggersCommand, "", NULL },
|
||||
{ "event_scripts", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadEventScriptsCommand, "", NULL },
|
||||
{ "command", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadCommandCommand, "", NULL },
|
||||
{ "creature_involvedrelation", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadCreatureQuestInvRelationsCommand,"",NULL },
|
||||
{ "creature_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesCreatureCommand, "", NULL },
|
||||
{ "creature_questrelation", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadCreatureQuestRelationsCommand, "", NULL },
|
||||
{ "disenchant_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesDisenchantCommand, "", NULL },
|
||||
{ "fishing_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesFishingCommand, "", NULL },
|
||||
{ "game_graveyard_zone", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadGameGraveyardZoneCommand, "", NULL },
|
||||
{ "game_tele", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadGameTeleCommand, "", NULL },
|
||||
{ "gameobject_involvedrelation", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadGOQuestInvRelationsCommand, "", NULL },
|
||||
{ "gameobject_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesGameobjectCommand, "", NULL },
|
||||
{ "gameobject_questrelation", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadGOQuestRelationsCommand, "", NULL },
|
||||
{ "gameobject_scripts", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadGameObjectScriptsCommand, "", NULL },
|
||||
{ "item_enchantment_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadItemEnchantementsCommand, "", NULL },
|
||||
{ "item_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesItemCommand, "", NULL },
|
||||
{ "mangos_string", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadMangosStringCommand, "", NULL },
|
||||
{ "npc_gossip", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadNpcGossipCommand, "", NULL },
|
||||
{ "npc_trainer", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadNpcTrainerCommand, "", NULL },
|
||||
{ "npc_vendor", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadNpcVendorCommand, "", NULL },
|
||||
{ "page_text", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadPageTextsCommand, "", NULL },
|
||||
{ "pickpocketing_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesPickpocketingCommand,"",NULL},
|
||||
{ "prospecting_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesProspectingCommand,"", NULL },
|
||||
{ "quest_mail_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesQuestMailCommand, "", NULL },
|
||||
{ "quest_end_scripts", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadQuestEndScriptsCommand, "", NULL },
|
||||
{ "quest_start_scripts", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadQuestStartScriptsCommand, "", NULL },
|
||||
{ "quest_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadQuestTemplateCommand, "", NULL },
|
||||
{ "reference_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesReferenceCommand, "", NULL },
|
||||
{ "reserved_name", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadReservedNameCommand, "", NULL },
|
||||
{ "skill_discovery_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSkillDiscoveryTemplateCommand, "", NULL },
|
||||
{ "skill_extra_item_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSkillExtraItemTemplateCommand, "", NULL },
|
||||
{ "skill_fishing_base_level", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSkillFishingBaseLevelCommand, "", NULL },
|
||||
{ "skinning_loot_template", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLootTemplatesSkinningCommand, "", NULL },
|
||||
{ "spell_affect", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellAffectCommand, "", NULL },
|
||||
{ "spell_chain", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellChainCommand, "", NULL },
|
||||
{ "spell_elixir", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellElixirCommand, "", NULL },
|
||||
{ "spell_learn_spell", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellLearnSpellCommand, "", NULL },
|
||||
{ "spell_pet_auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellPetAurasCommand, "", NULL },
|
||||
{ "spell_proc_event", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellProcEventCommand, "", NULL },
|
||||
{ "spell_script_target", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellScriptTargetCommand, "", NULL },
|
||||
{ "spell_scripts", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellScriptsCommand, "", NULL },
|
||||
{ "spell_target_position", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellTargetPositionCommand, "", NULL },
|
||||
{ "spell_threats", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadSpellThreatsCommand, "", NULL },
|
||||
{ "locales_creature", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLocalesCreatureCommand, "", NULL },
|
||||
{ "locales_gameobject", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLocalesGameobjectCommand, "", NULL },
|
||||
{ "locales_item", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLocalesItemCommand, "", NULL },
|
||||
{ "locales_npc_text", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLocalesNpcTextCommand, "", NULL },
|
||||
{ "locales_page_text", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL },
|
||||
{ "locales_quest", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
|
||||
{ "areatrigger_tavern", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAreaTriggerTavernCommand, "", NULL },
|
||||
{ "areatrigger_teleport", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAreaTriggerTeleportCommand, "", NULL },
|
||||
{ "areatrigger_involvedrelation",SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestAreaTriggersCommand, "", NULL },
|
||||
{ "event_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadEventScriptsCommand, "", NULL },
|
||||
{ "command", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCommandCommand, "", NULL },
|
||||
{ "creature_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestInvRelationsCommand,"",NULL },
|
||||
{ "creature_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesCreatureCommand, "", NULL },
|
||||
{ "creature_questrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestRelationsCommand, "", NULL },
|
||||
{ "disenchant_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesDisenchantCommand, "", NULL },
|
||||
{ "fishing_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesFishingCommand, "", NULL },
|
||||
{ "game_graveyard_zone", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadGameGraveyardZoneCommand, "", NULL },
|
||||
{ "game_tele", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadGameTeleCommand, "", NULL },
|
||||
{ "gameobject_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadGOQuestInvRelationsCommand, "", NULL },
|
||||
{ "gameobject_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesGameobjectCommand, "", NULL },
|
||||
{ "gameobject_questrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadGOQuestRelationsCommand, "", NULL },
|
||||
{ "gameobject_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadGameObjectScriptsCommand, "", NULL },
|
||||
{ "item_enchantment_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemEnchantementsCommand, "", NULL },
|
||||
{ "item_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesItemCommand, "", NULL },
|
||||
{ "mangos_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMangosStringCommand, "", NULL },
|
||||
{ "npc_gossip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcGossipCommand, "", NULL },
|
||||
{ "npc_trainer", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTrainerCommand, "", NULL },
|
||||
{ "npc_vendor", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcVendorCommand, "", NULL },
|
||||
{ "page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadPageTextsCommand, "", NULL },
|
||||
{ "pickpocketing_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesPickpocketingCommand,"",NULL},
|
||||
{ "prospecting_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesProspectingCommand,"", NULL },
|
||||
{ "quest_mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesQuestMailCommand, "", NULL },
|
||||
{ "quest_end_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestEndScriptsCommand, "", NULL },
|
||||
{ "quest_start_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestStartScriptsCommand, "", NULL },
|
||||
{ "quest_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestTemplateCommand, "", NULL },
|
||||
{ "reference_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesReferenceCommand, "", NULL },
|
||||
{ "reserved_name", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadReservedNameCommand, "", NULL },
|
||||
{ "skill_discovery_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSkillDiscoveryTemplateCommand, "", NULL },
|
||||
{ "skill_extra_item_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSkillExtraItemTemplateCommand, "", NULL },
|
||||
{ "skill_fishing_base_level", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSkillFishingBaseLevelCommand, "", NULL },
|
||||
{ "skinning_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesSkinningCommand, "", NULL },
|
||||
{ "spell_affect", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellAffectCommand, "", NULL },
|
||||
{ "spell_chain", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellChainCommand, "", NULL },
|
||||
{ "spell_elixir", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellElixirCommand, "", NULL },
|
||||
{ "spell_learn_spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLearnSpellCommand, "", NULL },
|
||||
{ "spell_pet_auras", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellPetAurasCommand, "", NULL },
|
||||
{ "spell_proc_event", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellProcEventCommand, "", NULL },
|
||||
{ "spell_script_target", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellScriptTargetCommand, "", NULL },
|
||||
{ "spell_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellScriptsCommand, "", NULL },
|
||||
{ "spell_target_position", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellTargetPositionCommand, "", NULL },
|
||||
{ "spell_threats", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellThreatsCommand, "", NULL },
|
||||
{ "locales_creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesCreatureCommand, "", NULL },
|
||||
{ "locales_gameobject", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesGameobjectCommand, "", NULL },
|
||||
{ "locales_item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesItemCommand, "", NULL },
|
||||
{ "locales_npc_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesNpcTextCommand, "", NULL },
|
||||
{ "locales_page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL },
|
||||
{ "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
|
||||
|
||||
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadCommand, "", NULL },
|
||||
{ "", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
|
@ -274,36 +274,36 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
|
||||
static ChatCommand guildCommandTable[] =
|
||||
{
|
||||
{ "create", SEC_GAMEMASTER, false, &ChatHandler::HandleGuildCreateCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
|
||||
{ "invite", SEC_GAMEMASTER, false, &ChatHandler::HandleGuildInviteCommand, "", NULL },
|
||||
{ "uninvite", SEC_GAMEMASTER, false, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
|
||||
{ "rank", SEC_GAMEMASTER, false, &ChatHandler::HandleGuildRankCommand, "", NULL },
|
||||
{ "create", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildCreateCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
|
||||
{ "invite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildInviteCommand, "", NULL },
|
||||
{ "uninvite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
|
||||
{ "rank", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildRankCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand lookupPlayerCommandTable[] =
|
||||
{
|
||||
{ "ip", SEC_GAMEMASTER, false, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
|
||||
{ "account", SEC_GAMEMASTER, false, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
|
||||
{ "email", SEC_GAMEMASTER, false, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
|
||||
{ "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
|
||||
{ "account", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
|
||||
{ "email", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand lookupCommandTable[] =
|
||||
{
|
||||
{ "area", SEC_MODERATOR, false, &ChatHandler::HandleLookupAreaCommand, "", NULL },
|
||||
{ "creature", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
|
||||
{ "event", SEC_GAMEMASTER, false, &ChatHandler::HandleLookupEventCommand, "", NULL },
|
||||
{ "faction", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupFactionCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupItemCommand, "", NULL },
|
||||
{ "itemset", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupObjectCommand, "", NULL },
|
||||
{ "quest", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupQuestCommand, "", NULL },
|
||||
{ "player", SEC_GAMEMASTER, false, NULL, "", lookupPlayerCommandTable },
|
||||
{ "skill", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupSkillCommand, "", NULL },
|
||||
{ "spell", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLookupSpellCommand, "", NULL },
|
||||
{ "tele", SEC_MODERATOR, false, &ChatHandler::HandleLookupTeleCommand, "", NULL },
|
||||
{ "area", SEC_MODERATOR, true, &ChatHandler::HandleLookupAreaCommand, "", NULL },
|
||||
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
|
||||
{ "event", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupEventCommand, "", NULL },
|
||||
{ "faction", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupFactionCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemCommand, "", NULL },
|
||||
{ "itemset", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupObjectCommand, "", NULL },
|
||||
{ "quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupQuestCommand, "", NULL },
|
||||
{ "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
|
||||
{ "skill", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSkillCommand, "", NULL },
|
||||
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
|
||||
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
|
@ -337,9 +337,9 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
|
||||
static ChatCommand listCommandTable[] =
|
||||
{
|
||||
{ "creature", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListCreatureCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListItemCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListObjectCommand, "", NULL },
|
||||
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListCreatureCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListItemCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListObjectCommand, "", NULL },
|
||||
{ "auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListAurasCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
|
@ -347,7 +347,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
static ChatCommand teleCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddTeleCommand, "", NULL },
|
||||
{ "del", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDelTeleCommand, "", NULL },
|
||||
{ "del", SEC_ADMINISTRATOR, true, &ChatHandler::HandleDelTeleCommand, "", NULL },
|
||||
{ "name", SEC_MODERATOR, true, &ChatHandler::HandleNameTeleCommand, "", NULL },
|
||||
{ "group", SEC_MODERATOR, false, &ChatHandler::HandleGroupTeleCommand, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, &ChatHandler::HandleTeleCommand, "", NULL },
|
||||
|
|
@ -454,11 +454,11 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "honor", SEC_GAMEMASTER, false, NULL, "", honorCommandTable },
|
||||
{ "wp", SEC_GAMEMASTER, false, NULL, "", wpCommandTable },
|
||||
{ "quest", SEC_ADMINISTRATOR, false, NULL, "", questCommandTable },
|
||||
{ "reload", SEC_ADMINISTRATOR, false, NULL, "", reloadCommandTable },
|
||||
{ "list", SEC_ADMINISTRATOR, false, NULL, "", listCommandTable },
|
||||
{ "lookup", SEC_ADMINISTRATOR, false, NULL, "", lookupCommandTable },
|
||||
{ "reload", SEC_ADMINISTRATOR, true, NULL, "", reloadCommandTable },
|
||||
{ "list", SEC_ADMINISTRATOR, true, NULL, "", listCommandTable },
|
||||
{ "lookup", SEC_ADMINISTRATOR, true, NULL, "", lookupCommandTable },
|
||||
{ "pdump", SEC_ADMINISTRATOR, true, NULL, "", pdumpCommandTable },
|
||||
{ "guild", SEC_ADMINISTRATOR, false, NULL, "", guildCommandTable },
|
||||
{ "guild", SEC_ADMINISTRATOR, true, NULL, "", guildCommandTable },
|
||||
{ "cast", SEC_ADMINISTRATOR, false, NULL, "", castCommandTable },
|
||||
{ "reset", SEC_ADMINISTRATOR, false, NULL, "", resetCommandTable },
|
||||
{ "instance", SEC_ADMINISTRATOR, false, NULL, "", instanceCommandTable },
|
||||
|
|
|
|||
|
|
@ -447,16 +447,16 @@ enum MangosStrings
|
|||
LANG_ITEMLIST_AUCTION = 510,
|
||||
|
||||
LANG_WRONG_LINK_TYPE = 511,
|
||||
LANG_ITEM_LIST = 512,
|
||||
LANG_QUEST_LIST = 513,
|
||||
LANG_CREATURE_ENTRY_LIST = 514,
|
||||
LANG_CREATURE_LIST = 515,
|
||||
LANG_GO_ENTRY_LIST = 516,
|
||||
LANG_GO_LIST = 517,
|
||||
LANG_ITEMSET_LIST = 518,
|
||||
LANG_ITEM_LIST_CHAT = 512,
|
||||
LANG_QUEST_LIST_CHAT = 513,
|
||||
LANG_CREATURE_ENTRY_LIST_CHAT = 514,
|
||||
LANG_CREATURE_LIST_CHAT = 515,
|
||||
LANG_GO_ENTRY_LIST_CHAT = 516,
|
||||
LANG_GO_LIST_CHAT = 517,
|
||||
LANG_ITEMSET_LIST_CHAT = 518,
|
||||
LANG_TELE_LIST = 519,
|
||||
LANG_SPELL_LIST = 520,
|
||||
LANG_SKILL_LIST = 521,
|
||||
LANG_SKILL_LIST_CHAT = 521,
|
||||
|
||||
LANG_GAMEOBJECT_NOT_EXIST = 522,
|
||||
|
||||
|
|
@ -529,7 +529,7 @@ enum MangosStrings
|
|||
LANG_COMMAND_NEAROBJMESSAGE = 581,
|
||||
LANG_COMMAND_RAWPAWNTIMES = 582,
|
||||
|
||||
LANG_EVENT_ENTRY_LIST = 583,
|
||||
LANG_EVENT_ENTRY_LIST_CHAT = 583,
|
||||
LANG_NOEVENTFOUND = 584,
|
||||
LANG_EVENT_NOT_EXIST = 585,
|
||||
LANG_EVENT_INFO = 586,
|
||||
|
|
@ -667,7 +667,16 @@ enum MangosStrings
|
|||
LANG_MOTD_NEW = 1100,
|
||||
LANG_ACCOUNT_SETADDON = 1101,
|
||||
LANG_SENDMESSAGE = 1102,
|
||||
// Room for more level 3 1103-1199 not used
|
||||
LANG_EVENT_ENTRY_LIST_CONSOLE = 1103,
|
||||
LANG_CREATURE_ENTRY_LIST_CONSOLE = 1104,
|
||||
LANG_ITEM_LIST_CONSOLE = 1105,
|
||||
LANG_ITEMSET_LIST_CONSOLE = 1106,
|
||||
LANG_GO_ENTRY_LIST_CONSOLE = 1107,
|
||||
LANG_QUEST_LIST_CONSOLE = 1108,
|
||||
LANG_SKILL_LIST_CONSOLE = 1109,
|
||||
LANG_CREATURE_LIST_CONSOLE = 1110,
|
||||
LANG_GO_LIST_CONSOLE = 1111,
|
||||
// Room for more level 3 1112-1199 not used
|
||||
|
||||
// FREE IDS 1200-9999
|
||||
|
||||
|
|
|
|||
|
|
@ -1664,7 +1664,7 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
|
|||
AreaTableEntry const *areaEntry = sAreaStore.LookupEntry (areaflag);
|
||||
if (areaEntry)
|
||||
{
|
||||
int loc = m_session->GetSessionDbcLocale();
|
||||
int loc = m_session ? m_session->GetSessionDbcLocale () : sWorld.GetDefaultDbcLocale();
|
||||
std::string name = areaEntry->area_name[loc];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
|
@ -1674,7 +1674,7 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
|
|||
loc = 0;
|
||||
for(; loc < MAX_LOCALE; ++loc)
|
||||
{
|
||||
if(loc==m_session->GetSessionDbcLocale())
|
||||
if (m_session && loc==m_session->GetSessionDbcLocale ())
|
||||
continue;
|
||||
|
||||
name = areaEntry->area_name[loc];
|
||||
|
|
@ -1690,7 +1690,10 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
|
|||
{
|
||||
// send area in "id - [name]" format
|
||||
std::ostringstream ss;
|
||||
if (m_session)
|
||||
ss << areaEntry->ID << " - |cffffffff|Harea:" << areaEntry->ID << "|h[" << name << " " << localeNames[loc]<< "]|h|r";
|
||||
else
|
||||
ss << areaEntry->ID << " - " << name << " " << localeNames[loc];
|
||||
|
||||
SendSysMessage (ss.str ().c_str());
|
||||
|
||||
|
|
@ -1698,8 +1701,10 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (counter == 0) // if counter == 0 then we found nth
|
||||
SendSysMessage (LANG_COMMAND_NOAREAFOUND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1712,6 +1717,7 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
|
|||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
char const* str = strtok((char*)args, " ");
|
||||
if(!str)
|
||||
return false;
|
||||
|
|
@ -1725,9 +1731,9 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
|
|||
// converting string that we try to find to lower case
|
||||
wstrToLower( wnamepart );
|
||||
|
||||
GameTeleMap const & teleMap = objmgr.GetGameTeleMap();
|
||||
|
||||
std::ostringstream reply;
|
||||
|
||||
GameTeleMap const & teleMap = objmgr.GetGameTeleMap();
|
||||
for(GameTeleMap::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
|
||||
{
|
||||
GameTele const* tele = &itr->second;
|
||||
|
|
@ -1735,11 +1741,10 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
|
|||
if(tele->wnameLow.find(wnamepart) == std::wstring::npos)
|
||||
continue;
|
||||
|
||||
reply << " |cffffffff|Htele:";
|
||||
reply << itr->first;
|
||||
reply << "|h[";
|
||||
reply << tele->name;
|
||||
reply << "]|h|r\n";
|
||||
if (m_session)
|
||||
reply << " |cffffffff|Htele:" << itr->first << "|h[" << tele->name << "]|h|r\n";
|
||||
else
|
||||
reply << " " << itr->first << " " << tele->name << "\n";
|
||||
}
|
||||
|
||||
if(reply.str().empty())
|
||||
|
|
|
|||
|
|
@ -557,13 +557,8 @@ bool ChatHandler::HandleLookupFactionCommand(const char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
// Can be NULL at console call
|
||||
Player *target = getSelectedPlayer ();
|
||||
if (!target)
|
||||
{
|
||||
SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string namepart = args;
|
||||
std::wstring wnamepart;
|
||||
|
|
@ -576,16 +571,21 @@ bool ChatHandler::HandleLookupFactionCommand(const char* args)
|
|||
|
||||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
for (uint32 id = 0; id < sFactionStore.GetNumRows(); id++)
|
||||
//for(FactionStateList::const_iterator itr = target->m_factions.begin(); itr != target->m_factions.end(); ++itr)
|
||||
for (uint32 id = 0; id < sFactionStore.GetNumRows(); ++id)
|
||||
{
|
||||
FactionEntry const *factionEntry = sFactionStore.LookupEntry (id);
|
||||
//FactionEntry const *factionEntry = sFactionStore.LookupEntry(itr->second.ID);
|
||||
if (factionEntry)
|
||||
{
|
||||
FactionState const* repState = NULL;
|
||||
if(target)
|
||||
{
|
||||
FactionStateList::const_iterator repItr = target->m_factions.find (factionEntry->reputationListID);
|
||||
if(repItr != target->m_factions.end())
|
||||
repState = &repItr->second;
|
||||
}
|
||||
|
||||
int loc = m_session->GetSessionDbcLocale();
|
||||
|
||||
int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
|
||||
std::string name = factionEntry->name[loc];
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
|
@ -595,7 +595,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char* args)
|
|||
loc = 0;
|
||||
for(; loc < MAX_LOCALE; ++loc)
|
||||
{
|
||||
if(loc==m_session->GetSessionDbcLocale())
|
||||
if(m_session && loc==m_session->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = factionEntry->name[loc];
|
||||
|
|
@ -612,26 +612,29 @@ bool ChatHandler::HandleLookupFactionCommand(const char* args)
|
|||
// send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format
|
||||
// or "id - [faction] [no reputation]" format
|
||||
std::ostringstream ss;
|
||||
if (m_session)
|
||||
ss << id << " - |cffffffff|Hfaction:" << id << "|h[" << name << " " << localeNames[loc] << "]|h|r";
|
||||
else
|
||||
ss << id << " - " << name << " " << localeNames[loc];
|
||||
|
||||
if (repItr != target->m_factions.end())
|
||||
if (repState) // and then target!=NULL also
|
||||
{
|
||||
ReputationRank rank = target->GetReputationRank(factionEntry);
|
||||
std::string rankName = GetMangosString(ReputationRankStrIndex[rank]);
|
||||
|
||||
ss << " " << rankName << "|h|r (" << target->GetReputation(factionEntry) << ")";
|
||||
|
||||
if(repItr->second.Flags & FACTION_FLAG_VISIBLE)
|
||||
if(repState->Flags & FACTION_FLAG_VISIBLE)
|
||||
ss << GetMangosString(LANG_FACTION_VISIBLE);
|
||||
if(repItr->second.Flags & FACTION_FLAG_AT_WAR)
|
||||
if(repState->Flags & FACTION_FLAG_AT_WAR)
|
||||
ss << GetMangosString(LANG_FACTION_ATWAR);
|
||||
if(repItr->second.Flags & FACTION_FLAG_PEACE_FORCED)
|
||||
if(repState->Flags & FACTION_FLAG_PEACE_FORCED)
|
||||
ss << GetMangosString(LANG_FACTION_PEACE_FORCED);
|
||||
if(repItr->second.Flags & FACTION_FLAG_HIDDEN)
|
||||
if(repState->Flags & FACTION_FLAG_HIDDEN)
|
||||
ss << GetMangosString(LANG_FACTION_HIDDEN);
|
||||
if(repItr->second.Flags & FACTION_FLAG_INVISIBLE_FORCED)
|
||||
if(repState->Flags & FACTION_FLAG_INVISIBLE_FORCED)
|
||||
ss << GetMangosString(LANG_FACTION_INVISIBLE_FORCED);
|
||||
if(repItr->second.Flags & FACTION_FLAG_INACTIVE)
|
||||
if(repState->Flags & FACTION_FLAG_INACTIVE)
|
||||
ss << GetMangosString(LANG_FACTION_INACTIVE);
|
||||
}
|
||||
else
|
||||
|
|
@ -3588,7 +3591,12 @@ bool ChatHandler::HandleLookupEventCommand(const char* args)
|
|||
if (Utf8FitTo(descr, wnamepart))
|
||||
{
|
||||
char const* active = activeEvents.find(id) != activeEvents.end() ? GetMangosString(LANG_ACTIVE) : "";
|
||||
PSendSysMessage(LANG_EVENT_ENTRY_LIST,id,id,descr.c_str(),active );
|
||||
|
||||
if(m_session)
|
||||
PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT,id,id,eventData.description.c_str(),active );
|
||||
else
|
||||
PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE,id,eventData.description.c_str(),active );
|
||||
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -3613,7 +3621,11 @@ bool ChatHandler::HandleEventActiveListCommand(const char* args)
|
|||
uint32 event_id = *itr;
|
||||
GameEventData const& eventData = events[event_id];
|
||||
|
||||
PSendSysMessage(LANG_EVENT_ENTRY_LIST,event_id,event_id,eventData.description.c_str(),active );
|
||||
if(m_session)
|
||||
PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT,event_id,event_id,eventData.description.c_str(),active );
|
||||
else
|
||||
PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE,event_id,eventData.description.c_str(),active );
|
||||
|
||||
++counter;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2029,10 +2029,16 @@ bool ChatHandler::HandleListItemCommand(const char* args)
|
|||
char* cId = extractKeyFromLink((char*)args,"Hitem");
|
||||
if(!cId)
|
||||
return false;
|
||||
|
||||
uint32 item_id = atol(cId);
|
||||
if(!item_id)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, item_id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemPrototype const* itemProto = item_id ? itemProto = objmgr.GetItemPrototype(item_id) : NULL;
|
||||
|
||||
ItemPrototype const* itemProto = objmgr.GetItemPrototype(item_id);
|
||||
if(!itemProto)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, item_id);
|
||||
|
|
@ -2211,10 +2217,15 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
|
|||
return false;
|
||||
|
||||
uint32 go_id = atol(cId);
|
||||
if(!go_id)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_LISTOBJINVALIDID, go_id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(go_id);
|
||||
|
||||
if(!go_id || !gInfo)
|
||||
if(!gInfo)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_LISTOBJINVALIDID, go_id);
|
||||
SetSentErrorMessage(true);
|
||||
|
|
@ -2227,7 +2238,6 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
|
|||
if(count < 0)
|
||||
return false;
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
QueryResult *result;
|
||||
|
||||
uint32 obj_count = 0;
|
||||
|
|
@ -2238,8 +2248,15 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
|
|||
delete result;
|
||||
}
|
||||
|
||||
if(m_session)
|
||||
{
|
||||
Player* pl = m_session->GetPlayer();
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),go_id,uint32(count));
|
||||
}
|
||||
else
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM gameobject WHERE id = '%u' LIMIT %u",
|
||||
go_id,uint32(count));
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
|
@ -2252,7 +2269,10 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
|
|||
float z = fields[3].GetFloat();
|
||||
int mapid = fields[4].GetUInt16();
|
||||
|
||||
PSendSysMessage(LANG_GO_LIST, guid, guid, gInfo->name, x, y, z, mapid);
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_GO_LIST_CHAT, guid, guid, gInfo->name, x, y, z, mapid);
|
||||
else
|
||||
PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name, x, y, z, mapid);
|
||||
} while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
|
@ -2291,7 +2311,7 @@ bool ChatHandler::HandleNearObjectCommand(const char* args)
|
|||
if(!gInfo)
|
||||
continue;
|
||||
|
||||
PSendSysMessage(LANG_GO_LIST, guid, guid, gInfo->name, x, y, z, mapid);
|
||||
PSendSysMessage(LANG_GO_LIST_CHAT, guid, guid, gInfo->name, x, y, z, mapid);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
|
@ -2314,10 +2334,15 @@ bool ChatHandler::HandleListCreatureCommand(const char* args)
|
|||
return false;
|
||||
|
||||
uint32 cr_id = atol(cId);
|
||||
if(!cr_id)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_INVALIDCREATUREID, cr_id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(cr_id);
|
||||
|
||||
if(!cr_id || !cInfo)
|
||||
if(!cInfo)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_INVALIDCREATUREID, cr_id);
|
||||
SetSentErrorMessage(true);
|
||||
|
|
@ -2330,7 +2355,6 @@ bool ChatHandler::HandleListCreatureCommand(const char* args)
|
|||
if(count < 0)
|
||||
return false;
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
QueryResult *result;
|
||||
|
||||
uint32 cr_count = 0;
|
||||
|
|
@ -2341,8 +2365,15 @@ bool ChatHandler::HandleListCreatureCommand(const char* args)
|
|||
delete result;
|
||||
}
|
||||
|
||||
if(m_session)
|
||||
{
|
||||
Player* pl = m_session->GetPlayer();
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM creature WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), cr_id,uint32(count));
|
||||
}
|
||||
else
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM creature WHERE id = '%u' LIMIT %u",
|
||||
cr_id,uint32(count));
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
|
@ -2355,7 +2386,10 @@ bool ChatHandler::HandleListCreatureCommand(const char* args)
|
|||
float z = fields[3].GetFloat();
|
||||
int mapid = fields[4].GetUInt16();
|
||||
|
||||
PSendSysMessage(LANG_CREATURE_LIST, guid, guid, cInfo->Name, x, y, z, mapid);
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, guid, cInfo->Name, x, y, z, mapid);
|
||||
else
|
||||
PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name, x, y, z, mapid);
|
||||
} while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
|
@ -2388,7 +2422,7 @@ bool ChatHandler::HandleLookupItemCommand(const char* args)
|
|||
if(!pProto)
|
||||
continue;
|
||||
|
||||
int loc_idx = m_session->GetSessionDbLocaleIndex();
|
||||
int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
|
||||
if ( loc_idx >= 0 )
|
||||
{
|
||||
ItemLocale const *il = objmgr.GetItemLocale(pProto->ItemId);
|
||||
|
|
@ -2400,7 +2434,10 @@ bool ChatHandler::HandleLookupItemCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
PSendSysMessage(LANG_ITEM_LIST, id, id, name.c_str());
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_ITEM_LIST_CHAT, id, id, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_ITEM_LIST_CONSOLE, id, name.c_str());
|
||||
++counter;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2414,7 +2451,10 @@ bool ChatHandler::HandleLookupItemCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
PSendSysMessage(LANG_ITEM_LIST, id, id, name.c_str());
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_ITEM_LIST_CHAT, id, id, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_ITEM_LIST_CONSOLE, id, name.c_str());
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -2447,8 +2487,8 @@ bool ChatHandler::HandleLookupItemSetCommand(const char* args)
|
|||
ItemSetEntry const *set = sItemSetStore.LookupEntry(id);
|
||||
if(set)
|
||||
{
|
||||
int loc = m_session->GetSessionDbcLocale();
|
||||
std::string name = set->name[m_session->GetSessionDbcLocale()];
|
||||
int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
|
||||
std::string name = set->name[loc];
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
||||
|
|
@ -2457,10 +2497,10 @@ bool ChatHandler::HandleLookupItemSetCommand(const char* args)
|
|||
loc = 0;
|
||||
for(; loc < MAX_LOCALE; ++loc)
|
||||
{
|
||||
if(loc==m_session->GetSessionDbcLocale())
|
||||
if(m_session && loc==m_session->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = set->name[m_session->GetSessionDbcLocale()];
|
||||
name = set->name[loc];
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
||||
|
|
@ -2472,7 +2512,10 @@ bool ChatHandler::HandleLookupItemSetCommand(const char* args)
|
|||
if(loc < MAX_LOCALE)
|
||||
{
|
||||
// send item set in "id - [namedlink locale]" format
|
||||
PSendSysMessage(LANG_ITEMSET_LIST,id,id,name.c_str(),localeNames[loc]);
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_ITEMSET_LIST_CHAT,id,id,name.c_str(),localeNames[loc]);
|
||||
else
|
||||
PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE,id,name.c_str(),localeNames[loc]);
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -2484,17 +2527,12 @@ bool ChatHandler::HandleLookupItemSetCommand(const char* args)
|
|||
|
||||
bool ChatHandler::HandleLookupSkillCommand(const char* args)
|
||||
{
|
||||
Player* target = getSelectedPlayer();
|
||||
if(!target)
|
||||
{
|
||||
SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!*args)
|
||||
return false;
|
||||
|
||||
// can be NULL in console call
|
||||
Player* target = getSelectedPlayer();
|
||||
|
||||
std::string namepart = args;
|
||||
std::wstring wnamepart;
|
||||
|
||||
|
|
@ -2512,7 +2550,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
|
|||
SkillLineEntry const *skillInfo = sSkillLineStore.LookupEntry(id);
|
||||
if(skillInfo)
|
||||
{
|
||||
int loc = m_session->GetSessionDbcLocale();
|
||||
int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
|
||||
std::string name = skillInfo->name[loc];
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
|
@ -2522,7 +2560,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
|
|||
loc = 0;
|
||||
for(; loc < MAX_LOCALE; ++loc)
|
||||
{
|
||||
if(loc==m_session->GetSessionDbcLocale())
|
||||
if(m_session && loc==m_session->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = skillInfo->name[loc];
|
||||
|
|
@ -2536,8 +2574,15 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
|
|||
|
||||
if(loc < MAX_LOCALE)
|
||||
{
|
||||
char const* knownStr = "";
|
||||
if(target && target->HasSkill(id))
|
||||
knownStr = GetMangosString(LANG_KNOWN);
|
||||
|
||||
// send skill in "id - [namedlink locale]" format
|
||||
PSendSysMessage(LANG_SKILL_LIST,id,id,name.c_str(),localeNames[loc],(target->HasSkill(id) ? m_session->GetMangosString(LANG_KNOWN) : ""));
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_SKILL_LIST_CHAT,id,id,name.c_str(),localeNames[loc],knownStr);
|
||||
else
|
||||
PSendSysMessage(LANG_SKILL_LIST_CONSOLE,id,name.c_str(),localeNames[loc],knownStr);
|
||||
|
||||
++counter;
|
||||
}
|
||||
|
|
@ -2550,17 +2595,12 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
|
|||
|
||||
bool ChatHandler::HandleLookupSpellCommand(const char* args)
|
||||
{
|
||||
Player* target = getSelectedPlayer();
|
||||
if( !target )
|
||||
{
|
||||
SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!*args)
|
||||
return false;
|
||||
|
||||
// can be NULL at console call
|
||||
Player* target = getSelectedPlayer();
|
||||
|
||||
std::string namepart = args;
|
||||
std::wstring wnamepart;
|
||||
|
||||
|
|
@ -2578,7 +2618,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
|
|||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(id);
|
||||
if(spellInfo)
|
||||
{
|
||||
int loc = m_session->GetSessionDbcLocale();
|
||||
int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
|
||||
std::string name = spellInfo->SpellName[loc];
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
|
@ -2588,7 +2628,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
|
|||
loc = 0;
|
||||
for(; loc < MAX_LOCALE; ++loc)
|
||||
{
|
||||
if(loc==m_session->GetSessionDbcLocale())
|
||||
if(m_session && loc==m_session->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = spellInfo->SpellName[loc];
|
||||
|
|
@ -2602,14 +2642,14 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
|
|||
|
||||
if(loc < MAX_LOCALE)
|
||||
{
|
||||
bool known = target->HasSpell(id);
|
||||
bool known = target && target->HasSpell(id);
|
||||
bool learn = (spellInfo->Effect[0] == SPELL_EFFECT_LEARN_SPELL);
|
||||
|
||||
uint32 telentCost = GetTalentSpellCost(id);
|
||||
|
||||
bool talent = (telentCost > 0);
|
||||
bool passive = IsPassiveSpell(id);
|
||||
bool active = target->HasAura(id,0) || target->HasAura(id,1) || target->HasAura(id,2);
|
||||
bool active = target && (target->HasAura(id,0) || target->HasAura(id,1) || target->HasAura(id,2));
|
||||
|
||||
// unit32 used to prevent interpreting uint8 as char at output
|
||||
// find rank of learned spell for learning spell, or talent rank
|
||||
|
|
@ -2617,13 +2657,19 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
|
|||
|
||||
// send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
|
||||
std::ostringstream ss;
|
||||
if (m_session)
|
||||
ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name;
|
||||
else
|
||||
ss << id << " - " << name;
|
||||
|
||||
// include rank in link name
|
||||
if(rank)
|
||||
ss << GetMangosString(LANG_SPELL_RANK) << rank;
|
||||
|
||||
if (m_session)
|
||||
ss << " " << localeNames[loc] << "]|h|r";
|
||||
else
|
||||
ss << " " << localeNames[loc];
|
||||
|
||||
if(talent)
|
||||
ss << GetMangosString(LANG_TALENT);
|
||||
|
|
@ -2649,17 +2695,12 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
|
|||
|
||||
bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
||||
{
|
||||
Player* target = getSelectedPlayer();
|
||||
if( !target )
|
||||
{
|
||||
SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!*args)
|
||||
return false;
|
||||
|
||||
// can be NULL at console call
|
||||
Player* target = getSelectedPlayer();
|
||||
|
||||
std::string namepart = args;
|
||||
std::wstring wnamepart;
|
||||
|
||||
|
|
@ -2676,7 +2717,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
{
|
||||
Quest * qinfo = iter->second;
|
||||
|
||||
int loc_idx = m_session->GetSessionDbLocaleIndex();
|
||||
int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
|
||||
if ( loc_idx >= 0 )
|
||||
{
|
||||
QuestLocale const *il = objmgr.GetQuestLocale(qinfo->GetQuestId());
|
||||
|
|
@ -2687,10 +2728,13 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
std::string title = il->Title[loc_idx];
|
||||
|
||||
if (Utf8FitTo(title, wnamepart))
|
||||
{
|
||||
char const* statusStr = "";
|
||||
|
||||
if(target)
|
||||
{
|
||||
QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
|
||||
|
||||
char const* statusStr = "";
|
||||
if(status == QUEST_STATUS_COMPLETE)
|
||||
{
|
||||
if(target->GetQuestRewardStatus(qinfo->GetQuestId()))
|
||||
|
|
@ -2700,8 +2744,12 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
}
|
||||
else if(status == QUEST_STATUS_INCOMPLETE)
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_ACTIVE);
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_QUEST_LIST,qinfo->GetQuestId(),qinfo->GetQuestId(),title.c_str(),(status == QUEST_STATUS_COMPLETE ? GetMangosString(LANG_COMPLETE) : (status == QUEST_STATUS_INCOMPLETE ? GetMangosString(LANG_ACTIVE) : "") ));
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
else
|
||||
PSendSysMessage(LANG_QUEST_LIST_CONSOLE,qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
++counter;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2714,10 +2762,13 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
continue;
|
||||
|
||||
if (Utf8FitTo(title, wnamepart))
|
||||
{
|
||||
char const* statusStr = "";
|
||||
|
||||
if(target)
|
||||
{
|
||||
QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
|
||||
|
||||
char const* statusStr = "";
|
||||
if(status == QUEST_STATUS_COMPLETE)
|
||||
{
|
||||
if(target->GetQuestRewardStatus(qinfo->GetQuestId()))
|
||||
|
|
@ -2727,8 +2778,13 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
}
|
||||
else if(status == QUEST_STATUS_INCOMPLETE)
|
||||
statusStr = GetMangosString(LANG_COMMAND_QUEST_ACTIVE);
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
else
|
||||
PSendSysMessage(LANG_QUEST_LIST_CONSOLE,qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
|
||||
PSendSysMessage(LANG_QUEST_LIST,qinfo->GetQuestId(),qinfo->GetQuestId(), title.c_str(),(status == QUEST_STATUS_COMPLETE ? GetMangosString(LANG_COMPLETE) : (status == QUEST_STATUS_INCOMPLETE ? GetMangosString(LANG_ACTIVE) : "") ));
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -2755,13 +2811,13 @@ bool ChatHandler::HandleLookupCreatureCommand(const char* args)
|
|||
|
||||
uint32 counter = 0;
|
||||
|
||||
for (uint32 id = 0; id< sCreatureStorage.MaxEntry; id++ )
|
||||
for (uint32 id = 0; id< sCreatureStorage.MaxEntry; ++id)
|
||||
{
|
||||
CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo> (id);
|
||||
if(!cInfo)
|
||||
continue;
|
||||
|
||||
int loc_idx = m_session->GetSessionDbLocaleIndex();
|
||||
int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
CreatureLocale const *cl = objmgr.GetCreatureLocale (id);
|
||||
|
|
@ -2773,7 +2829,10 @@ bool ChatHandler::HandleLookupCreatureCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo (name, wnamepart))
|
||||
{
|
||||
PSendSysMessage(LANG_CREATURE_ENTRY_LIST, id, id, name.c_str());
|
||||
if (m_session)
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str ());
|
||||
else
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str ());
|
||||
++counter;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2787,7 +2846,10 @@ bool ChatHandler::HandleLookupCreatureCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
PSendSysMessage(LANG_CREATURE_ENTRY_LIST,id,id,name.c_str());
|
||||
if (m_session)
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str ());
|
||||
else
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str ());
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -2820,7 +2882,7 @@ bool ChatHandler::HandleLookupObjectCommand(const char* args)
|
|||
if(!gInfo)
|
||||
continue;
|
||||
|
||||
int loc_idx = m_session->GetSessionDbLocaleIndex();
|
||||
int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
|
||||
if ( loc_idx >= 0 )
|
||||
{
|
||||
GameObjectLocale const *gl = objmgr.GetGameObjectLocale(id);
|
||||
|
|
@ -2832,7 +2894,10 @@ bool ChatHandler::HandleLookupObjectCommand(const char* args)
|
|||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST, id, id, name.c_str());
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, id, id, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, id, name.c_str());
|
||||
++counter;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2846,7 +2911,10 @@ bool ChatHandler::HandleLookupObjectCommand(const char* args)
|
|||
|
||||
if(Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST, id, id, name.c_str());
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, id, id, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, id, name.c_str());
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
@ -2871,26 +2939,22 @@ bool ChatHandler::HandleGuildCreateCommand(const char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
Guild *guild;
|
||||
Player * player;
|
||||
char *lname,*gname;
|
||||
std::string guildname;
|
||||
|
||||
lname = strtok((char*)args, " ");
|
||||
gname = strtok(NULL, "");
|
||||
char *lname = strtok ((char*)args, " ");
|
||||
char *gname = strtok (NULL, "");
|
||||
|
||||
if (!lname)
|
||||
return false;
|
||||
else if(!gname)
|
||||
|
||||
if (!gname)
|
||||
{
|
||||
SendSysMessage (LANG_INSERT_GUILD_NAME);
|
||||
SetSentErrorMessage (true);
|
||||
return false;
|
||||
}
|
||||
|
||||
guildname = gname;
|
||||
player = ObjectAccessor::Instance().FindPlayerByName(lname);
|
||||
std::string guildname = gname;
|
||||
|
||||
Player* player = ObjectAccessor::Instance ().FindPlayerByName (lname);
|
||||
if (!player)
|
||||
{
|
||||
SendSysMessage (LANG_PLAYER_NOT_FOUND);
|
||||
|
|
@ -2898,9 +2962,13 @@ bool ChatHandler::HandleGuildCreateCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!player->GetGuildId())
|
||||
if (player->GetGuildId())
|
||||
{
|
||||
guild = new Guild;
|
||||
SendSysMessage (LANG_PLAYER_IN_GUILD);
|
||||
return true;
|
||||
}
|
||||
|
||||
Guild *guild = new Guild;
|
||||
if (!guild->create (player->GetGUID (),guildname))
|
||||
{
|
||||
delete guild;
|
||||
|
|
@ -2910,10 +2978,6 @@ bool ChatHandler::HandleGuildCreateCommand(const char* args)
|
|||
}
|
||||
|
||||
objmgr.AddGuild (guild);
|
||||
}
|
||||
else
|
||||
SendSysMessage(LANG_PLAYER_IN_GUILD);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -2964,6 +3028,7 @@ bool ChatHandler::HandleGuildUninviteCommand(const char *args)
|
|||
char* par1 = strtok ((char*)args, " ");
|
||||
if(!par1)
|
||||
return false;
|
||||
|
||||
std::string plName = par1;
|
||||
if (!normalizePlayerName (plName))
|
||||
{
|
||||
|
|
@ -5275,14 +5340,20 @@ bool ChatHandler::HandleLoadPDumpCommand(const char *args)
|
|||
if(!account_id)
|
||||
{
|
||||
account_id = atoi(account); // use original string
|
||||
if(account_id)
|
||||
if(!account_id)
|
||||
{
|
||||
if(!accmgr.GetName(account_id,account_name))
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
if(!accmgr.GetName(account_id,account_name))
|
||||
{
|
||||
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
char * name = strtok(NULL, " ");
|
||||
char * guid_str = name ? strtok(NULL, " ") : NULL;
|
||||
|
|
|
|||
|
|
@ -653,6 +653,7 @@ class ObjectMgr
|
|||
}
|
||||
const char *GetMangosString(int32 entry, int locale_idx) const;
|
||||
const char *GetMangosStringForDBCLocale(int32 entry) const { return GetMangosString(entry,DBCLocaleIndex); }
|
||||
int32 GetDBCLocaleIndex() const { return DBCLocaleIndex; }
|
||||
void SetDBCLocaleIndex(uint32 lang) { DBCLocaleIndex = GetIndexForLocale(LocaleConstant(lang)); }
|
||||
|
||||
void AddCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_guid, uint32 instance);
|
||||
|
|
|
|||
|
|
@ -370,13 +370,12 @@ bool PlayerDumpReader::LoadDump(std::string file, uint32 account, std::string na
|
|||
delete result;
|
||||
|
||||
if (charcount >= 10)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
FILE *fin = fopen(file.c_str(), "r");
|
||||
if(!fin) return false;
|
||||
if(!fin)
|
||||
return false;
|
||||
|
||||
QueryResult * result = NULL;
|
||||
char newguid[20], chraccount[20], newpetid[20], currpetid[20], lastpetid[20];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue