Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Scripts/Commands: dropped now deprecated cs_pet command file as it's …
Browse files Browse the repository at this point in the history
…meddling with the integrity of pets which should never be allowed in the first place
  • Loading branch information
Ovahlord committed Oct 25, 2023
1 parent 5f0d6ad commit aae8357
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 239 deletions.
10 changes: 5 additions & 5 deletions src/server/game/Accounts/RBAC.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,10 @@ enum RBACPermissions
RBAC_PERM_COMMAND_GROUP_JOIN = 476,
RBAC_PERM_COMMAND_GROUP_LIST = 477,
RBAC_PERM_COMMAND_GROUP_SUMMON = 478,
RBAC_PERM_COMMAND_PET = 479,
RBAC_PERM_COMMAND_PET_CREATE = 480,
RBAC_PERM_COMMAND_PET_LEARN = 481,
RBAC_PERM_COMMAND_PET_UNLEARN = 482,
RBAC_PERM_COMMAND_PET = 479, // DEPRECATED: DON'T REUSE
RBAC_PERM_COMMAND_PET_CREATE = 480, // DEPRECATED: DON'T REUSE
RBAC_PERM_COMMAND_PET_LEARN = 481, // DEPRECATED: DON'T REUSE
RBAC_PERM_COMMAND_PET_UNLEARN = 482, // DEPRECATED: DON'T REUSE
RBAC_PERM_COMMAND_SEND = 483,
RBAC_PERM_COMMAND_SEND_ITEMS = 484,
RBAC_PERM_COMMAND_SEND_MAIL = 485,
Expand Down Expand Up @@ -735,7 +735,7 @@ enum RBACPermissions
RBAC_PERM_COMMAND_DEBUG_LOADCELLS = 835,
RBAC_PERM_COMMAND_DEBUG_BOUNDARY = 836,
RBAC_PERM_COMMAND_NPC_EVADE = 837,
RBAC_PERM_COMMAND_PET_LEVEL = 838,
RBAC_PERM_COMMAND_PET_LEVEL = 838, // DEPRECATED: DON'T REUSE
RBAC_PERM_COMMAND_SERVER_SHUTDOWN_FORCE = 839,
RBAC_PERM_COMMAND_SERVER_RESTART_FORCE = 840,
RBAC_PERM_COMMAND_NEARGRAVEYARD = 841,
Expand Down
14 changes: 8 additions & 6 deletions src/server/scripts/Commands/cs_npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,8 @@ class npc_commandscript : public CommandScript
Creature* creatureTarget = handler->getSelectedCreature();
if (!creatureTarget || creatureTarget->IsPet())
{
handler->PSendSysMessage (LANG_SELECT_CREATURE);
handler->SetSentErrorMessage (true);
handler->PSendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}

Expand All @@ -1489,21 +1489,23 @@ class npc_commandscript : public CommandScript

if (!cInfo->IsTameable (player->CanTameExoticPets()))
{
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
handler->SetSentErrorMessage (true);
handler->PSendSysMessage(LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
handler->SetSentErrorMessage(true);
return false;
}

Optional<uint8> slot = player->GetUnusedActivePetSlot();
if (!slot.has_value())
{
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
handler->PSendSysMessage(LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
handler->SetSentErrorMessage(true);
return false;
}

if (!player->CreatePlayerPetData(*slot, 0, creatureTarget->GetEntry()))
{
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
handler->PSendSysMessage(LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
handler->SetSentErrorMessage(true);
return false;
}

Expand Down
228 changes: 0 additions & 228 deletions src/server/scripts/Commands/cs_pet.cpp

This file was deleted.

0 comments on commit aae8357

Please sign in to comment.