[10251] Clarify error message for one from redundent commamd data case.

This commit is contained in:
VladimirMangos 2010-07-23 19:33:12 +04:00
parent 9350c9990d
commit 50c2e8eca2
6 changed files with 13 additions and 5 deletions

View file

@ -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_10244_01_mangos_command` bit(1) default NULL
`required_10251_01_mangos_command` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@ -788,7 +788,6 @@ INSERT INTO `command` VALUES
('waterwalk',2,'Syntax: .waterwalk on/off\r\n\r\nSet on/off waterwalk state for selected player.'),
('wchange',3,'Syntax: .wchange #weathertype #status\r\n\r\nSet current weather to #weathertype with an intensity of #status.\r\n\r\n#weathertype can be 1 for rain, 2 for snow, and 3 for sand. #status can be 0 for disabled, and 1 for enabled.'),
('whispers',1,'Syntax: .whispers on|off\r\nEnable/disable accepting whispers by GM from players. By default use mangosd.conf setting.'),
('wp',2,'Using WP Command:\r\nEach Waypoint Command has it\'s own description!'),
('wp add',2,'Syntax: .wp add [#creature_guid or Select a Creature]'),
('wp export',3,'Syntax: .wp export [#creature_guid or Select a Creature] $filename'),
('wp import',3,'Syntax: .wp import $filename'),

View file

@ -0,0 +1,3 @@
ALTER TABLE db_version CHANGE COLUMN required_10244_01_mangos_command required_10251_01_mangos_command bit;
DELETE FROM command WHERE name = 'wp';

View file

@ -120,6 +120,7 @@ pkgdata_DATA = \
10223_01_mangos_spell_proc_event.sql \
10237_01_mangos_spell_bonus_data.sql \
10244_01_mangos_command.sql \
10251_01_mangos_command.sql \
README
## Additional files to include when running 'make dist'
@ -220,4 +221,5 @@ EXTRA_DIST = \
10223_01_mangos_spell_proc_event.sql \
10237_01_mangos_spell_bonus_data.sql \
10244_01_mangos_command.sql \
10251_01_mangos_command.sql \
README

View file

@ -1155,7 +1155,11 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand *commandTable, const char
}
case CHAT_COMMAND_UNKNOWN_SUBCOMMAND:
{
sLog.outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.", cmdName.c_str(), fullcommand.c_str());
// command have subcommands, but not '' subcommand and then any data in `command` useless for it.
if (cmdName.empty())
sLog.outErrorDb("Table `command` have command '%s' that only used with some subcommand selection, it can't have help or overwritten access level, skip.", cmdName.c_str(), fullcommand.c_str());
else
sLog.outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.", cmdName.c_str(), fullcommand.c_str());
return false;
}
case CHAT_COMMAND_UNKNOWN:

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10250"
#define REVISION_NR "10251"
#endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_10160_02_characters_pet_aura"
#define REVISION_DB_MANGOS "required_10244_01_mangos_command"
#define REVISION_DB_MANGOS "required_10251_01_mangos_command"
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
#endif // __REVISION_SQL_H__