Fix build on windows.

Fix command ticket viewname - thx Deadlyskunk for point this
fix setlink command group, add missing commands to db - patch by XTElite1

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-07-26 02:00:35 +02:00
parent 9f1118cf0a
commit 3c04635694
6 changed files with 12 additions and 4 deletions
+4
View File
@@ -0,0 +1,4 @@
DELETE FROM `command` WHERE `name` IN ('reload creature_linked_respawn', 'npc setlink');
INSERT INTO `command` (`name`,`security`,`help`) VALUES
('reload creature_linked_respawn',2,'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'),
('npc setlink',2,'Syntax: .npc setlink $creatureGUID\r\n\r\nLinks respawn of selected creature to the condition that $creatureGUID defined is alive.');
+2
View File
@@ -490,6 +490,7 @@ INSERT INTO `command` VALUES
('npc info',3,'Syntax: .npc info\r\n\r\nDisplay a list of details for the selected creature.\r\n\r\nThe list includes:\r\n- GUID, Faction, NPC flags, Entry ID, Model ID,\r\n- Level,\r\n- Health (current/maximum),\r\n\r\n- Field flags, dynamic flags, faction template, \r\n- Position information,\r\n- and the creature type, e.g. if the creature is a vendor.'), ('npc info',3,'Syntax: .npc info\r\n\r\nDisplay a list of details for the selected creature.\r\n\r\nThe list includes:\r\n- GUID, Faction, NPC flags, Entry ID, Model ID,\r\n- Level,\r\n- Health (current/maximum),\r\n\r\n- Field flags, dynamic flags, faction template, \r\n- Position information,\r\n- and the creature type, e.g. if the creature is a vendor.'),
('npc move',2,'Syntax: .npc move [#creature_guid]\r\n\r\nMove the targeted creature spawn point to your coordinates.'), ('npc move',2,'Syntax: .npc move [#creature_guid]\r\n\r\nMove the targeted creature spawn point to your coordinates.'),
('npc playemote',3,'Syntax: .npc playemote #emoteid\r\n\r\nMake the selected creature emote with an emote of id #emoteid.'), ('npc playemote',3,'Syntax: .npc playemote #emoteid\r\n\r\nMake the selected creature emote with an emote of id #emoteid.'),
('npc setlink',2,'Syntax: .npc setlink $creatureGUID\r\n\r\nLinks respawn of selected creature to the condition that $creatureGUID defined is alive.'),
('npc say',1,'Syntax: .npc say $message\nMake selected creature say specified message.'), ('npc say',1,'Syntax: .npc say $message\nMake selected creature say specified message.'),
('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'), ('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'),
('npc setmodel',2,'Syntax: .npc setmodel #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'), ('npc setmodel',2,'Syntax: .npc setmodel #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'),
@@ -534,6 +535,7 @@ INSERT INTO `command` VALUES
('reload config',3,'Syntax: .reload config\r\n\r\nReload config settings (by default stored in trinityd.conf). Not all settings can be change at reload: some new setting values will be ignored until restart, some values will applied with delay or only to new objects/maps, some values will explicitly rejected to change at reload.'), ('reload config',3,'Syntax: .reload config\r\n\r\nReload config settings (by default stored in trinityd.conf). Not all settings can be change at reload: some new setting values will be ignored until restart, some values will applied with delay or only to new objects/maps, some values will explicitly rejected to change at reload.'),
('reload creature_involvedrelation',3,'Syntax: .reload creature_involvedrelation\nReload creature_involvedrelation table.'), ('reload creature_involvedrelation',3,'Syntax: .reload creature_involvedrelation\nReload creature_involvedrelation table.'),
('reload creature_loot_template',3,'Syntax: .reload creature_loot_template\nReload creature_loot_template table.'), ('reload creature_loot_template',3,'Syntax: .reload creature_loot_template\nReload creature_loot_template table.'),
('reload creature_linked_respawn',2,'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'),
('reload creature_questrelation',3,'Syntax: .reload creature_questrelation\nReload creature_questrelation table.'), ('reload creature_questrelation',3,'Syntax: .reload creature_questrelation\nReload creature_questrelation table.'),
('reload disenchant_loot_template',3,'Syntax: .reload disenchant_loot_template\nReload disenchant_loot_template table.'), ('reload disenchant_loot_template',3,'Syntax: .reload disenchant_loot_template\nReload disenchant_loot_template table.'),
('reload event_scripts',3,'Syntax: .reload event_scripts\nReload event_scripts table.'), ('reload event_scripts',3,'Syntax: .reload event_scripts\nReload event_scripts table.'),
+1 -1
View File
@@ -373,6 +373,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL }, { "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL },
{ "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL }, { "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL },
{ "addformation", SEC_MODERATOR, false, &ChatHandler::HandleNpcAddFormationCommand, "", NULL }, { "addformation", SEC_MODERATOR, false, &ChatHandler::HandleNpcAddFormationCommand, "", NULL },
{ "setlink", SEC_MODERATOR, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL },
//{ TODO: fix or remove this commands //{ TODO: fix or remove this commands
{ "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL }, { "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL },
@@ -547,7 +548,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ {
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL }, { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL }, { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL },
{ "setlink", SEC_MODERATOR, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL } { NULL, 0, false, NULL, "", NULL }
}; };
+4 -1
View File
@@ -400,7 +400,10 @@ bool ChatHandler::HandleGMTicketGetByNameCommand(const char* args)
if(!*args) if(!*args)
return false; return false;
Player *plr = objmgr.GetPlayer(args); std::string name = (char*)args;
normalizePlayerName(name);
Player *plr = objmgr.GetPlayer(name.c_str());
if(!plr) if(!plr)
{ {
SendSysMessage(LANG_NO_PLAYERS_FOUND); SendSysMessage(LANG_NO_PLAYERS_FOUND);
+1 -1
View File
@@ -255,7 +255,7 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
if(incremental) if(incremental)
{ {
// int32 *= float cause one point loss? // int32 *= float cause one point loss?
standing = roundf( (float)standing * sWorld.getRate(RATE_REPUTATION_GAIN) ); standing = floor( (float)standing * sWorld.getRate(RATE_REPUTATION_GAIN) + 0.5 );
standing += itr->second.Standing + BaseRep; standing += itr->second.Standing + BaseRep;
} }
-1
View File
@@ -24,7 +24,6 @@
#include "Language.h" #include "Language.h"
#include "DBCStructure.h" #include "DBCStructure.h"
#include <map> #include <map>
#include <math.h>
static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] = static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] =
{ {