Merge pull request #1169 from splose/endurance

#endurance
This commit is contained in:
Chris Miles 2021-01-03 17:18:01 -06:00 committed by GitHub
commit 306328529e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -206,6 +206,7 @@ int command_init(void)
command_add("emotesearch", "Searches NPC Emotes", 80, command_emotesearch) ||
command_add("emoteview", "Lists all NPC Emotes", 80, command_emoteview) ||
command_add("enablerecipe", "[recipe_id] - Enables a recipe using the recipe id.", 80, command_enablerecipe) ||
command_add("endurance", "Restores you or your target's endurance.", 50, command_endurance) ||
command_add("equipitem", "[slotid(0-21)] - Equip the item on your cursor into the specified slot", 50, command_equipitem) ||
command_add("face", "- Change the face of your target", 80, command_face) ||
command_add("faction", "[Find (criteria | all ) | Review (criteria | all) | Reset (id)] - Resets Player's Faction", 80, command_faction) ||
@ -737,6 +738,19 @@ void command_logcommand(Client *c, const char *message)
/*
* commands go below here
*/
void command_endurance(Client *c, const Seperator *sep)
{
Mob *t;
t = c->GetTarget() ? c->GetTarget() : c;
if (t->IsClient())
t->CastToClient()->SetEndurance(t->CastToClient()->GetMaxEndurance());
else
t->SetEndurance(t->GetMaxEndurance());
t->Message(Chat::White, "Your endurance has been refilled.");
}
void command_setstat(Client* c, const Seperator* sep){
if(sep->arg[1][0] && sep->arg[2][0] && c->GetTarget()!=0 && c->GetTarget()->IsClient()){
c->GetTarget()->CastToClient()->SetStats(atoi(sep->arg[1]),atoi(sep->arg[2]));

View File

@ -99,6 +99,7 @@ void command_emote(Client *c, const Seperator *sep);
void command_emotesearch(Client* c, const Seperator *sep);
void command_emoteview(Client* c, const Seperator *sep);
void command_enablerecipe(Client *c, const Seperator *sep);
void command_endurance(Client *c, const Seperator *sep);
void command_equipitem(Client *c, const Seperator *sep);
void command_face(Client *c, const Seperator *sep);
void command_faction(Client *c, const Seperator *sep);