diff options
author | Kudlaty <none@none> | 2009-07-26 02:00:35 +0200 |
---|---|---|
committer | Kudlaty <none@none> | 2009-07-26 02:00:35 +0200 |
commit | 3c046356942193756987dc646b30dcf408a1630f (patch) | |
tree | 2b2fecd0d40ba8f82584100e7e3aa39e4b4be65c /src | |
parent | 9f1118cf0a3c6b08fc6477c1f009187a4b1270af (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Chat.cpp | 2 | ||||
-rw-r--r-- | src/game/Level1.cpp | 5 | ||||
-rw-r--r-- | src/game/ReputationMgr.cpp | 2 | ||||
-rw-r--r-- | src/game/ReputationMgr.h | 1 |
4 files changed, 6 insertions, 4 deletions
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index b14a7f94e6e..4dcc603afc4 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -373,6 +373,7 @@ ChatCommand * ChatHandler::getCommandTable() { "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL }, { "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL }, { "addformation", SEC_MODERATOR, false, &ChatHandler::HandleNpcAddFormationCommand, "", NULL }, + { "setlink", SEC_MODERATOR, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL }, //{ TODO: fix or remove this commands { "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL }, @@ -547,7 +548,6 @@ ChatCommand * ChatHandler::getCommandTable() { { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL }, { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL }, - { "setlink", SEC_MODERATOR, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 8e234057f94..6c344b29903 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -400,7 +400,10 @@ bool ChatHandler::HandleGMTicketGetByNameCommand(const char* args) if(!*args) return false; - Player *plr = objmgr.GetPlayer(args); + std::string name = (char*)args; + normalizePlayerName(name); + + Player *plr = objmgr.GetPlayer(name.c_str()); if(!plr) { SendSysMessage(LANG_NO_PLAYERS_FOUND); diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 8e6aa511d21..7536fb54f03 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -255,7 +255,7 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in if(incremental) { // 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; } diff --git a/src/game/ReputationMgr.h b/src/game/ReputationMgr.h index 494f675d20a..d63c518eb82 100644 --- a/src/game/ReputationMgr.h +++ b/src/game/ReputationMgr.h @@ -24,7 +24,6 @@ #include "Language.h" #include "DBCStructure.h" #include <map> -#include <math.h> static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] = { |