aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level3.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-18 19:01:41 -0600
committermegamage <none@none>2009-01-18 19:01:41 -0600
commit40e7dcb599c1e596151356a4cc4d6f641bc1ec05 (patch)
tree7793b2697c9151f96394f77f1d89375ee092f69a /src/game/Level3.cpp
parentc85c89dc0b0564113e48bfcaf96dc2af55d73bb8 (diff)
*Update to Mangos 7111.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r--src/game/Level3.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index f73e4e1b305..c68865a2794 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -2717,15 +2717,25 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
if(loc < MAX_LOCALE)
{
+ char valStr[50] = "";
char const* knownStr = "";
if(target && target->HasSkill(id))
+ {
knownStr = GetTrinityString(LANG_KNOWN);
+ uint32 curValue = target->GetPureSkillValue(id);
+ uint32 maxValue = target->GetPureMaxSkillValue(id);
+ uint32 permValue = target->GetSkillPermBonusValue(id);
+ uint32 tempValue = target->GetSkillTempBonusValue(id);
+
+ char const* valFormat = GetTrinityString(LANG_SKILL_VALUES);
+ snprintf(valStr,50,valFormat,curValue,maxValue,permValue,tempValue);
+ }
// send skill in "id - [namedlink locale]" format
if (m_session)
- PSendSysMessage(LANG_SKILL_LIST_CHAT,id,id,name.c_str(),localeNames[loc],knownStr);
+ PSendSysMessage(LANG_SKILL_LIST_CHAT,id,id,name.c_str(),localeNames[loc],knownStr,valStr);
else
- PSendSysMessage(LANG_SKILL_LIST_CONSOLE,id,name.c_str(),localeNames[loc],knownStr);
+ PSendSysMessage(LANG_SKILL_LIST_CONSOLE,id,name.c_str(),localeNames[loc],knownStr,valStr);
++counter;
}
@@ -3922,8 +3932,6 @@ bool ChatHandler::HandleShowAreaCommand(const char* args)
if (!*args)
return false;
- int area = atoi((char*)args);
-
Player *chr = getSelectedPlayer();
if (chr == NULL)
{
@@ -3932,10 +3940,11 @@ bool ChatHandler::HandleShowAreaCommand(const char* args)
return false;
}
+ int area = GetAreaFlagByAreaID(atoi((char*)args));
int offset = area / 32;
uint32 val = (uint32)(1 << (area % 32));
- if(offset >= 128)
+ if(area<0 || offset >= 128)
{
SendSysMessage(LANG_BAD_VALUE);
SetSentErrorMessage(true);
@@ -3954,8 +3963,6 @@ bool ChatHandler::HandleHideAreaCommand(const char* args)
if (!*args)
return false;
- int area = atoi((char*)args);
-
Player *chr = getSelectedPlayer();
if (chr == NULL)
{
@@ -3964,10 +3971,11 @@ bool ChatHandler::HandleHideAreaCommand(const char* args)
return false;
}
+ int area = GetAreaFlagByAreaID(atoi((char*)args));
int offset = area / 32;
uint32 val = (uint32)(1 << (area % 32));
- if(offset >= 128)
+ if(area<0 || offset >= 128)
{
SendSysMessage(LANG_BAD_VALUE);
SetSentErrorMessage(true);