aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2016-02-06 15:23:22 +0100
committertreeston <treeston.mmoc@gmail.com>2016-02-06 15:24:39 +0100
commite064000a355005f596557c2ad10d5d189996f426 (patch)
treeec93601559cf58e078cd43ca2a675b186b3edd3c /src/server/scripts
parent57a5879070092cb10b7b94c99045cd51e2fd743c (diff)
Code style, urand -> urandms.
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/World/npcs_special.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 63c57702ece..40f9e63f4f6 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2596,7 +2596,7 @@ public:
void Reset() override
{
_events.Reset();
- _events.ScheduleEvent(EVENT_MOVE_POS, urand(1.0, 20.0) * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_MOVE_POS, urandms(1, 20));
}
void UpdateAI(uint32 diff) override
@@ -2613,14 +2613,12 @@ public:
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(0, owner->GetPositionX() + frand(-30.0f, 30.0f), owner->GetPositionY() + frand(-30.0f, 30.0f), owner->GetPositionZ());
}
- _events.ScheduleEvent(EVENT_RETURN, urand(3.0, 4.0) * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_RETURN, urandms(3, 4));
break;
case EVENT_RETURN:
if (Unit* owner = me->GetCharmerOrOwner())
- {
- me->GetMotionMaster()->MoveFollow(me->GetCharmerOrOwner(), PET_FOLLOW_DIST, me->GetFollowAngle());
- }
- _events.ScheduleEvent(EVENT_MOVE_POS, urand(1.0, 20.0) * IN_MILLISECONDS);
+ me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle());
+ _events.ScheduleEvent(EVENT_MOVE_POS, urandms(1, 20));
break;
default:
break;