Core/Misc: Refactor scripts to fix static analysis warnings
First batch of fixes targeting 100 issues reported by Coverity
This commit is contained in:
1 parent
681cf8f27c
commit
dd4dbdcd16
45 files changed
+1150
-450
No files matched your search
@@ -39,11 +39,19 @@ class npc_pet_gen_mojo : public CreatureScript
|
||||
|
||||
struct npc_pet_gen_mojoAI : public ScriptedAI
|
||||
{
|
||||
npc_pet_gen_mojoAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_pet_gen_mojoAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_victimGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_victimGUID = 0;
|
||||
Initialize();
|
||||
|
||||
if (Unit* owner = me->GetOwner())
|
||||
me->GetMotionMaster()->MoveFollow(owner, 0.0f, 0.0f);
|
||||
|
||||
Reference in new issue
Block a user