mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[2008_10_29_01_mangos_string.sql 2008_10_29_02_mangos_command.sql] Added new command: .waterwalk on/off - disable or enable waterwalk mode
for selected player Signed-off-by: dythzer <micke223@gmail.com> Add help text and mangos strings. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
9534aece0b
commit
67779b76b7
8 changed files with 52 additions and 2 deletions
|
|
@ -4057,7 +4057,7 @@ bool ChatHandler::HandleRepairitemsCommand(const char* args)
|
|||
PSendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Repair items
|
||||
target->DurabilityRepairAll(false, 0, false);
|
||||
|
|
@ -4067,3 +4067,33 @@ bool ChatHandler::HandleRepairitemsCommand(const char* args)
|
|||
ChatHandler(target).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleWaterwalkCommand(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
||||
Player *player = getSelectedPlayer();
|
||||
|
||||
if(!player)
|
||||
{
|
||||
PSendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strncmp(args, "on", 3) == 0)
|
||||
player->SetMovement(MOVE_WATER_WALK); // ON
|
||||
else if (strncmp(args, "off", 4) == 0)
|
||||
player->SetMovement(MOVE_LAND_WALK); // OFF
|
||||
else
|
||||
{
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_YOU_SET_WATERWALK, args, player->GetName());
|
||||
if(needReportToTarget(player))
|
||||
ChatHandler(player).PSendSysMessage(LANG_YOUR_WATERWALK_SET, args, GetName());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue