Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static bool HandleNpcSetScaleCommand(ChatHandler* handler, const char* args)
- {
- if (!*args)
- return false;
- float Scale = (float)atof((char*)args);
- if (Scale > 10.0f || Scale < 0.1f)
- {
- handler->SendSysMessage(LANG_BAD_VALUE);
- handler->SetSentErrorMessage(true);
- return false;
- }
- Creature* creature = handler->getSelectedCreature();
- if (!creature || creature->isPet())
- {
- handler->SendSysMessage(LANG_SELECT_CREATURE);
- handler->SetSentErrorMessage(true);
- return false;
- }
- creature->SetObjectScale(Scale);
- creature->SaveToDB();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement