aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-04-01 20:36:30 +0200
committerShauren <shauren.trinity@gmail.com>2022-04-01 20:36:30 +0200
commit98e848436dd2bc8cebbbb5059a24c5ffcfd799a6 (patch)
treee31f1d022e963bf86170f9ff5c90b7a22d4d3822
parent2485d13e35cee4520323aad25313f3453537de6d (diff)
Core/Misc: Apply various cosmetic changes that were made to 3.3.5 branch when porting master branch code there
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp4
-rw-r--r--src/server/game/Entities/Unit/Unit.h5
-rw-r--r--src/server/game/Spells/Spell.h1
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h4
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp4
6 files changed, 8 insertions, 14 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 2c7e93cb0af..ef5dac43d9d 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -69,8 +69,8 @@ void SmartAI::StartPath(bool run/* = false*/, uint32 pathId/* = 0*/, bool repeat
if (invoker && invoker->GetTypeId() == TYPEID_PLAYER)
{
- _escortNPCFlags = me->m_unitData->NpcFlags[0];
- me->ReplaceAllNpcFlags((NPCFlags)0);
+ _escortNPCFlags = me->GetNpcFlags();
+ me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
}
me->GetMotionMaster()->MovePath(_path, _repeatWaypointPath);
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index aa9ec20bc68..0fbb844891d 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -2124,9 +2124,4 @@ namespace Trinity
};
}
-inline void SetUnitCurrentCastSpell(Unit* unit, Spell* spell)
-{
- unit->SetCurrentCastSpell(spell);
-}
-
#endif
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 76cba756fd0..64f7b6db188 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -237,7 +237,6 @@ static const uint32 SPELL_INTERRUPT_NONPLAYER = 32747;
class TC_GAME_API Spell
{
- friend void SetUnitCurrentCastSpell(Unit* unit, Spell* spell);
friend class SpellScript;
public:
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index 36b25e92fef..203609f513f 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -571,7 +571,7 @@ public:
return true;
}
- static bool HandleGameObjectSetStateCommand(ChatHandler* handler, GameObjectSpawnId guidLow, int32 objectType, Optional<int32> objectState)
+ static bool HandleGameObjectSetStateCommand(ChatHandler* handler, GameObjectSpawnId guidLow, int32 objectType, Optional<uint32> objectState)
{
if (!guidLow)
return false;
@@ -614,7 +614,7 @@ public:
object->SendCustomAnim(*objectState);
break;
case 5:
- if (objectState < 0 || objectState > GO_DESTRUCTIBLE_REBUILDING)
+ if (*objectState > GO_DESTRUCTIBLE_REBUILDING)
return false;
object->SetDestructibleState(GameObjectDestructibleState(*objectState));
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
index a4ead46b8a4..00ae53d5308 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
@@ -20,6 +20,8 @@
#include "CreatureAIImpl.h"
+struct Position;
+
#define DataHeader "CS"
#define CoSScriptName "instance_culling_of_stratholme"
@@ -83,8 +85,6 @@ uint32 constexpr EncounterCount = 5;
* - gets current instance state using GetData, then checks if we should despawn ourselves (bitmask check) *
\***********************************************************************************************************************/
-struct Position;
-
// Note: These are bitmask values to allow combining, but only a single bit will ever be true in instance script
enum COSProgressStates : uint32
{
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index 5fb17f72a3f..38ca6f735b7 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -507,7 +507,7 @@ public:
DoCast(player, SPELL_ARCANE_CHANNELING, true);//Arcane Channeling
break;
case 35:
- me->CastSpell(Position{ -8088, 1520.43f, 2.67f }, SPELL_TIME_STOP, true);
+ me->CastSpell(Position(-8088, 1520.43f, 2.67f), SPELL_TIME_STOP, true);
break;
case 36:
DoCast(player, SPELL_CALL_PRISMATIC_BARRIER, true);
@@ -557,7 +557,7 @@ public:
break;
case 50:
Fandral->AI()->Talk(FANDRAL_EMOTE_2);
- Fandral->CastSpell(Position{ -8127, 1525, 17.5f }, SPELL_THROW_HAMMER, true);
+ Fandral->CastSpell(Position(-8127, 1525, 17.5f), SPELL_THROW_HAMMER, true);
break;
case 51:
{