Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

This commit is contained in:
Vincent_Michael committed 2013-12-12 19:36:48 +01:00
commit 506ddbbf40
7 files changed
+59 -13

No files matched your search

@@ -135,7 +135,7 @@ DELETE FROM `creature_template_addon` WHERE `entry`=29370;
INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`emote`,`auras`) VALUES (29370,1,375, '');
UPDATE `creature` SET `spawndist`=0,`MovementType`=0 WHERE `guid`=113377;
UPDATE `Creature_template` SET InhabitType=4 WHERE `entry`=29368;
UPDATE `creature_template` SET InhabitType=4 WHERE `entry`=29368;
DELETE FROM `creature_addon` WHERE `guid` IN (100482);
DELETE FROM `creature_template_addon` WHERE `entry`=30001;
@@ -0,0 +1,44 @@
-- Bound Fire Elemental SAI
SET @ENTRY := 30416;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,6,0,0,3400,4800,11,17195,64,0,0,0,0,2,0,0,0,0,0,0,0,"Bound Fire Elemental - Combat CMC - Cast Scorch (Dungeon Only)"),
(@ENTRY,0,1,0,0,0,100,6,0,5,11000,14000,11,12470,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bound Fire Elemental - Combat - Cast Fire Nova (Dungeon Only)");
-- Bound Air Elemental SAI
SET @ENTRY := 30418;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,3400,4800,11,22414,64,0,0,0,0,2,0,0,0,0,0,0,0,"Bound Air Elemental - Combat CMC - Cast Lightning Bolt (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,4,0,0,3400,4800,11,59169,64,0,0,0,0,2,0,0,0,0,0,0,0,"Bound Air Elemental - Combat CMC - Cast Lightning Bolt (Heroic Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,10000,13000,11000,13000,11,46150,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bound Air Elemental - Combat - Cast Forked Lightning (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,4,10000,13000,11000,13000,11,59152,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bound Air Elemental - Combat - Cast Forked Lightning (Heroic Dungeon)");
-- Bound Water Elemental SAI
SET @ENTRY := 30419;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,6,0,0,3400,4800,11,56862,64,0,0,0,0,2,0,0,0,0,0,0,0,"Bound Water Elemental - Combat CMC - Cast Water Bolt (Dungeon Only)"),
(@ENTRY,0,1,0,0,0,100,2,9000,12000,12000,15000,11,39207,1,0,0,0,0,5,0,0,0,0,0,0,0,"Bound Water Elemental - Combat - Cast Water Spout (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,4,9000,12000,12000,15000,11,35735,1,0,0,0,0,5,0,0,0,0,0,0,0,"Bound Water Elemental - Combat - Cast Water Spout (Heroic Dungeon)");
-- Halefnir the Windborn SAI
SET @ENTRY := 30376;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,0,0,0,6000,6000,11,20831,64,0,0,0,0,2,0,0,0,0,0,0,0,"Halefnir the Windborn - Combat CMC - Cast Chain Lightning");
-- Twilight Darkcaster SAI
SET @ENTRY := 30319;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,4000,5000,11,12739,64,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Darkcaster - Combat CMC - Cast Shadow Bolt (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,4,0,0,5000,7000,11,61562,64,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Darkcaster - Combat CMC - Cast Shadow Bolt (Heroic Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,4000,7000,17000,20000,11,56898,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Darkcaster - Combat - Cast Corruption (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,4,4000,7000,17000,20000,11,61563,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Darkcaster - Combat - Cast Corruption (Heroic Dungeon)"),
(@ENTRY,0,4,0,0,0,100,6,12000,15000,19000,23000,11,13338,1,0,0,0,0,6,0,0,0,0,0,0,0,"Twilight Darkcaster - Combat - Cast Curse of Tongues (Dungeon Only)");
@@ -724,16 +724,16 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
void Creature::Motion_Initialize()
{
if (!m_formation)
i_motionMaster.Initialize();
GetMotionMaster()->Initialize();
else if (m_formation->getLeader() == this)
{
m_formation->FormationReset(false);
i_motionMaster.Initialize();
GetMotionMaster()->Initialize();
}
else if (m_formation->isFormed())
i_motionMaster.MoveIdle(); //wait the order of leader
GetMotionMaster()->MoveIdle(); //wait the order of leader
else
i_motionMaster.Initialize();
GetMotionMaster()->Initialize();
}
bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData* data)
@@ -1468,7 +1468,7 @@ void Creature::setDeathState(DeathState s)
m_formation->FormationReset(true);
if ((CanFly() || IsFlying()))
i_motionMaster.MoveFall();
GetMotionMaster()->MoveFall();
Unit::setDeathState(CORPSE);
}
+1 -1
View File
@@ -5228,7 +5228,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
void Player::KillPlayer()
{
if (IsFlying() && !GetTransport())
i_motionMaster.MoveFall();
GetMotionMaster()->MoveFall();
SetRooted(true);
+3 -2
View File
@@ -165,7 +165,7 @@ Unit::Unit(bool isWorldObject) :
IsAIEnabled(false), NeedChangeAI(false), LastCharmerGUID(0),
m_ControlledByPlayer(false), movespline(new Movement::MoveSpline()),
i_AI(NULL), i_disabledAI(NULL), m_AutoRepeatFirstCast(false), m_procDeep(0),
m_removedAurasCount(0), i_motionMaster(this), m_ThreatManager(this),
m_removedAurasCount(0), i_motionMaster(new MotionMaster(this)), m_ThreatManager(this),
m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE),
m_HostileRefManager(this), _lastDamagedTime(0)
{
@@ -292,6 +292,7 @@ Unit::~Unit()
_DeleteRemovedAuras();
delete i_motionMaster;
delete m_charmInfo;
delete movespline;
@@ -361,7 +362,7 @@ void Unit::Update(uint32 p_time)
}
UpdateSplineMovement(p_time);
i_motionMaster.UpdateMotion(p_time);
i_motionMaster->UpdateMotion(p_time);
}
bool Unit::haveOffhandWeapon() const
+3 -3
View File
@@ -2014,8 +2014,8 @@ class Unit : public WorldObject
static Player* GetPlayer(WorldObject& object, uint64 guid);
static Creature* GetCreature(WorldObject& object, uint64 guid);
MotionMaster* GetMotionMaster() { return &i_motionMaster; }
const MotionMaster* GetMotionMaster() const { return &i_motionMaster; }
MotionMaster* GetMotionMaster() { return i_motionMaster; }
const MotionMaster* GetMotionMaster() const { return i_motionMaster; }
bool IsStopped() const { return !(HasUnitState(UNIT_STATE_MOVING)); }
void StopMoving();
@@ -2197,7 +2197,7 @@ class Unit : public WorldObject
virtual SpellSchoolMask GetMeleeDamageSchoolMask() const;
MotionMaster i_motionMaster;
MotionMaster* i_motionMaster;
uint32 m_reactiveTimer[MAX_REACTIVE];
uint32 m_regenTimer;
+2 -1
View File
@@ -72,7 +72,8 @@ MotionMaster::~MotionMaster()
{
MovementGenerator *curr = top();
pop();
if (curr) DirectDelete(curr);
if (curr && !isStatic(curr))
delete curr; // Skip finalizing on delete, it might launch new movement
}
}