Skip to content

Instantly share code, notes, and snippets.

View Langerz82's full-sized avatar

Joshua L Langerz82

View GitHub Profile
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 0fb99e63d9..9ae272d017 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -787,7 +787,7 @@ void SmartAI::SetCombatMove(bool on)
}
else if (MovementGenerator* movement = me->GetMotionMaster()->GetMovementGenerator([](MovementGenerator const* a) -> bool
{
- return a->GetMovementGeneratorType() == CHASE_MOTION_TYPE && a->Mode == MOTION_MODE_DEFAULT && a->Priority == MOTION_PRIORITY_NORMAL;
+ return a->GetMovementGeneratorType() == CHASE_MOTION_TYPE && a->Mode == MOTION_MODE_OVERRIDE && a->Priority == MOTION_PRIORITY_NORMAL;
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 1dd66d7699..8683884b25 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -350,6 +350,40 @@ void CreatureAI::SetBoundary(CreatureBoundary const* boundary, bool negateBounda
me->DoImmediateBoundaryCheck();
}
+bool CreatureAI::CheckMeleeRepositionRequirements()
+{
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 09f5ef01a5..1d8ccf5aec 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -287,6 +287,7 @@ bool DispelableAura::RollDispel() const
return roll_chance_i(_chance);
}
+
Unit::Unit(bool isWorldObject) :
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
uint32 testChars;
const uint32 numTests = 1024;
ByteBuffer buff[numTests];
ByteBuffer buffOld[numTests];
ByteBufferNew buffNew[numTests];
for (int n = 0; n < 20; ++n)
{
for (int m = 0; m < numTests; ++m)
{
uint32 testChars;
const uint32 numTests = 1024;
ByteBuffer buff[numTests];
ByteBuffer buffOld[numTests];
ByteBufferNew buffNew[numTests];
for (int n = 0; n < 20; ++n)
{
for (int m = 0; m < numTests; ++m)
{
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index dfca5a7990..c2c8164f40 100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
@@ -129,7 +129,7 @@ bool UpdateData::BuildPacket(WorldPacket* packet)
if (destsize == 0)
return false;
- packet->resize(destsize + sizeof(uint32));
+ packet->wpos(destsize + sizeof(uint32));
diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h
index 7243f36ed1..952d35c83d 100644
--- a/src/server/game/Entities/Object/Updates/UpdateMask.h
+++ b/src/server/game/Entities/Object/Updates/UpdateMask.h
@@ -49,17 +49,21 @@ class UpdateMask
void AppendToPacket(ByteBuffer* data)
{
- for (uint32 i = 0; i < GetBlockCount(); ++i)
+ uint32 multiplier;
const uint32 testChars = 1024;
const uint32 numTests = 50;
ByteBuffer buff[numTests];
ByteBuffer buff2[numTests];
UpdateMask updateMask[numTests];
for (int n = 0; n < 10; ++n)
{
for (int m = 0; m < numTests; ++m)
{
updateMask[m].SetCount(testChars * 8);