aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2011_02_05_04_world_quest_template.sql1
-rw-r--r--sql/updates/world/2012_02_05_00_world_creature_template.sql2
-rw-r--r--sql/updates/world/2012_02_05_01_world_game_event.sql1
-rw-r--r--sql/updates/world/2012_02_05_02_world_creature.sql22
-rw-r--r--sql/updates/world/2012_02_05_03_world_game_event.sql1
-rwxr-xr-xsrc/server/game/AI/CoreAI/CombatAI.cpp6
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp29
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.cpp11
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.cpp4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.h4
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp28
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h2
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp6
16 files changed, 80 insertions, 43 deletions
diff --git a/sql/updates/world/2011_02_05_04_world_quest_template.sql b/sql/updates/world/2011_02_05_04_world_quest_template.sql
new file mode 100644
index 00000000000..093ca8aa8bf
--- /dev/null
+++ b/sql/updates/world/2011_02_05_04_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `OfferRewardText`= 'Alright, $n. You want to earn your keep with the Horde? Well there''s plenty to do here, so listen close and do what you''re told.$b$b$gI see that look in your eyes, do not think I will tolerate any insolence. Thrall himself has declared the Hordes females to be on equal footing with you men. Disrespect me in the slightest, and you will know true pain.:I''m happy to have met you. Thrall will be glad to know that more females like you and I are taking the initiative to push forward in the Barrens.;' WHERE `Id`=842;
diff --git a/sql/updates/world/2012_02_05_00_world_creature_template.sql b/sql/updates/world/2012_02_05_00_world_creature_template.sql
new file mode 100644
index 00000000000..31751f9f324
--- /dev/null
+++ b/sql/updates/world/2012_02_05_00_world_creature_template.sql
@@ -0,0 +1,2 @@
+-- Set correct faction from sniff
+UPDATE `creature_template` SET `faction_A`= 16,`faction_H`=16 WHERE `entry`=26231;
diff --git a/sql/updates/world/2012_02_05_01_world_game_event.sql b/sql/updates/world/2012_02_05_01_world_game_event.sql
new file mode 100644
index 00000000000..61c7e7db5ab
--- /dev/null
+++ b/sql/updates/world/2012_02_05_01_world_game_event.sql
@@ -0,0 +1 @@
+UPDATE `game_event` SET `start_time`= '2012-02-05 00:01:00', `holiday`=423 WHERE `eventEntry`=8; -- Love is in the Air
diff --git a/sql/updates/world/2012_02_05_02_world_creature.sql b/sql/updates/world/2012_02_05_02_world_creature.sql
new file mode 100644
index 00000000000..7426b7ef8b0
--- /dev/null
+++ b/sql/updates/world/2012_02_05_02_world_creature.sql
@@ -0,0 +1,22 @@
+-- add spawn for Saragosa
+SET @GUID := 40270;
+DELETE FROM `creature` WHERE `id`=26231;
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID,26231,571,1,1,0,0,3981.03687,7148.006,666.1618,1.037019,120,0,0,1,0,0,0,0,0);
+-- Pathing for Saragosa Entry: 26231
+
+SET @PATH = @GUID*10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@GUID;
+DELETE FROM `creature_addon` WHERE `guid`=@GUID;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@GUID,@PATH,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,3972.692,7139.177,666.609,0,0,0,0,100,0),
+(@PATH,2,3973.208,7140.034,666.609,0,0,0,0,100,0),
+(@PATH,3,3981.671,7149.173,666.2463,0,0,0,0,100,0),
+(@PATH,4,3989.375,7172.479,669.3846,0,0,0,0,100,0),
+(@PATH,5,3998.89,7199.31,674.7188,0,0,0,0,100,0),
+(@PATH,6,4012.167,7242.467,666.8287,0,0,0,0,100,0),
+(@PATH,7,4020.924,7276.525,652.9682,0,0,0,0,100,0),
+(@PATH,8,4026.488,7297.103,640.2736,0,0,0,0,100,0),
+(@PATH,9,4026.488,7297.103,640.2736,0,0,0,0,100,0);
diff --git a/sql/updates/world/2012_02_05_03_world_game_event.sql b/sql/updates/world/2012_02_05_03_world_game_event.sql
new file mode 100644
index 00000000000..157a2e9194c
--- /dev/null
+++ b/sql/updates/world/2012_02_05_03_world_game_event.sql
@@ -0,0 +1 @@
+UPDATE `game_event` SET `length`=20160 WHERE `eventEntry`=8; -- Love is in the Air
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index e178efc7eee..03d1b9793d9 100755
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -158,6 +158,12 @@ void CasterAI::UpdateAI(const uint32 diff)
events.Update(diff);
+ if (me->getVictim()->HasBreakableByDamageCrowdControlAura())
+ {
+ me->InterruptNonMeleeSpells(false);
+ return;
+ }
+
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 83a89a966c5..e07042df149 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -42,7 +42,6 @@ PetAI::PetAI(Creature* c) : CreatureAI(c), i_tracker(TIME_INTERVAL_LOOK)
{
m_AllySet.clear();
UpdateAllies();
- targetHasCC = false;
}
void PetAI::EnterEvadeMode()
@@ -55,9 +54,6 @@ bool PetAI::_needToStop()
if (me->isCharmed() && me->getVictim() == me->GetCharmer())
return true;
- if (_CheckTargetCC(me->getVictim()) && !targetHasCC)
- return true;
-
return !me->IsValidAttackTarget(me->getVictim());
}
@@ -95,13 +91,19 @@ void PetAI::UpdateAI(const uint32 diff)
// me->getVictim() can't be used for check in case stop fighting, me->getVictim() clear at Unit death etc.
if (me->getVictim())
{
+ // is only necessary to stop casting, the pet must not exit combat
+ if (me->getVictim()->HasBreakableByDamageCrowdControlAura())
+ {
+ me->InterruptNonMeleeSpells(false);
+ return;
+ }
+
if (_needToStop())
{
sLog->outStaticDebug("Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
_stopAttack();
return;
}
- targetHasCC = _CheckTargetCC(me->getVictim());
DoMeleeAttackIfReady();
}
@@ -293,8 +295,6 @@ void PetAI::AttackStart(Unit* target)
if (!CanAttack(target))
return;
- targetHasCC = _CheckTargetCC(target);
-
if (Unit* owner = me->GetOwner())
owner->SetInCombatWith(target);
@@ -310,22 +310,21 @@ Unit* PetAI::SelectNextTarget()
return NULL;
Unit* target = me->getAttackerForHelper();
- targetHasCC = false;
// Check pet's attackers first to prevent dragging mobs back to owner
- if (target && !_CheckTargetCC(target))
+ if (target && !target->HasBreakableByDamageCrowdControlAura())
return target;
if (me->GetCharmerOrOwner())
{
// Check owner's attackers if pet didn't have any
target = me->GetCharmerOrOwner()->getAttackerForHelper();
- if (target && !_CheckTargetCC(target))
+ if (target && !target->HasBreakableByDamageCrowdControlAura())
return target;
// 3.0.2 - Pets now start attacking their owners target in defensive mode as soon as the hunter does
target = me->GetCharmerOrOwner()->getVictim();
- if (target && !_CheckTargetCC(target))
+ if (target && !target->HasBreakableByDamageCrowdControlAura())
return target;
}
@@ -467,11 +466,3 @@ bool PetAI::CanAttack(Unit* target)
// default, though we shouldn't ever get here
return false;
}
-
-bool PetAI::_CheckTargetCC(Unit* target)
-{
- if (me->GetCharmerOrOwnerGUID() && target->HasNegativeAuraWithAttribute(SPELL_ATTR0_BREAKABLE_BY_DAMAGE, me->GetCharmerOrOwnerGUID()))
- return true;
-
- return false;
-}
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index 847b4140285..730ab12a3ca 100755
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -50,7 +50,6 @@ class PetAI : public CreatureAI
TimeTracker i_tracker;
bool inCombat;
- bool targetHasCC;
std::set<uint64> m_AllySet;
uint32 m_updateAlliesTimer;
@@ -58,7 +57,6 @@ class PetAI : public CreatureAI
void HandleReturnMovement();
void DoAttack(Unit* target, bool chase);
bool CanAttack(Unit* target);
- bool _CheckTargetCC(Unit* target);
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 5e529768c04..1e128429533 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -28,17 +28,6 @@
#include "Player.h"
#include "Util.h"
-// these variables aren't used outside of this file, so declare them only here
-uint32 BG_AB_HonorScoreTicks[BG_HONOR_MODE_NUM] = {
- 330, // normal honor
- 200 // holiday
-};
-
-uint32 BG_AB_ReputationScoreTicks[BG_HONOR_MODE_NUM] = {
- 200, // normal honor
- 150 // holiday
-};
-
BattlegroundAB::BattlegroundAB()
{
m_BuffChange = true;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index 562a6837431..50020a580b1 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -179,7 +179,7 @@ enum BG_AB_Objectives
#define BG_AB_NotABBGWeekendHonorTicks 260
#define BG_AB_ABBGWeekendHonorTicks 160
#define BG_AB_NotABBGWeekendReputationTicks 160
-#define BG_AB_ABBGWeekendReputationTicks 150
+#define BG_AB_ABBGWeekendReputationTicks 120
#define AB_EVENT_START_BATTLE 9158 // Achievement: Let's Get This Done
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index cbc3ec85055..b7994d0052c 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -30,8 +30,8 @@
// these variables aren't used outside of this file, so declare them only here
uint32 BG_EY_HonorScoreTicks[BG_HONOR_MODE_NUM] = {
- 330, // normal honor
- 200 // holiday
+ 260, // normal honor
+ 160 // holiday
};
BattlegroundEY::BattlegroundEY()
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index baa9ca30cff..026fbccc320 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -217,8 +217,8 @@ enum EYBattlegroundObjectTypes
BG_EY_OBJECT_MAX = 59
};
-#define BG_EY_NotEYWeekendHonorTicks 330
-#define BG_EY_EYWeekendHonorTicks 200
+#define BG_EY_NotEYWeekendHonorTicks 260
+#define BG_EY_EYWeekendHonorTicks 160
#define EY_EVENT_START_BATTLE 13180 // Achievement: Flurry
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 59c091f353d..96e8978ed33 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -516,6 +516,24 @@ bool Unit::HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint
return false;
}
+bool Unit::HasBreakableByDamageAuraType(AuraType type) const
+{
+ AuraEffectList const& auras = GetAuraEffectsByType(type);
+ for (AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ if ((*itr)->GetSpellInfo()->Attributes & SPELL_ATTR0_BREAKABLE_BY_DAMAGE || (*itr)->GetSpellInfo()->AuraInterruptFlags & AURA_INTERRUPT_FLAG_TAKE_DAMAGE)
+ return true;
+ return false;
+}
+
+bool Unit::HasBreakableByDamageCrowdControlAura() const
+{
+ return ( HasBreakableByDamageAuraType(SPELL_AURA_MOD_CONFUSE)
+ || HasBreakableByDamageAuraType(SPELL_AURA_MOD_FEAR)
+ || HasBreakableByDamageAuraType(SPELL_AURA_MOD_STUN)
+ || HasBreakableByDamageAuraType(SPELL_AURA_MOD_ROOT)
+ || HasBreakableByDamageAuraType(SPELL_AURA_TRANSFORM));
+}
+
void Unit::DealDamageMods(Unit* victim, uint32 &damage, uint32* absorb)
{
if (!victim || !victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
@@ -3334,19 +3352,19 @@ void Unit::_RemoveNoStackAurasDueToAura(Aura* aura)
return;
bool remove = false;
- for (AuraMap::iterator i = m_ownedAuras.begin(); i != m_ownedAuras.end(); ++i)
+ for (AuraApplicationMap::iterator i = m_appliedAuras.begin(); i != m_appliedAuras.end(); ++i)
{
if (remove)
{
remove = false;
- i = m_ownedAuras.begin();
+ i = m_appliedAuras.begin();
}
- if (aura->CanStackWith(i->second))
+ if (aura->CanStackWith(i->second->GetBase()))
continue;
- RemoveOwnedAura(i, AURA_REMOVE_BY_DEFAULT);
- if (i == m_ownedAuras.end())
+ RemoveAura(i, AURA_REMOVE_BY_DEFAULT);
+ if (i == m_appliedAuras.end())
break;
remove = true;
}
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index ea5e2d5052b..abcdf13c49b 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1555,6 +1555,8 @@ class Unit : public WorldObject
bool HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint32 familyFlags) const;
bool virtual HasSpell(uint32 /*spellID*/) const { return false; }
+ bool HasBreakableByDamageAuraType(AuraType type) const;
+ bool HasBreakableByDamageCrowdControlAura() const;
bool HasStealthAura() const { return HasAuraType(SPELL_AURA_MOD_STEALTH); }
bool HasInvisibilityAura() const { return HasAuraType(SPELL_AURA_MOD_INVISIBILITY); }
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 9f23fc51ee5..d49ac829ef9 100755
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -522,7 +522,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
// check target immunities
for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
{
- if (!itr->first->IsImmunedToSpellEffect(GetSpellInfo(), effIndex))
+ if (itr->first->IsImmunedToSpellEffect(GetSpellInfo(), effIndex))
itr->second &= ~(1 << effIndex);
}
if (!itr->second
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index fcf5f56c539..04e9c05e02d 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1738,6 +1738,12 @@ public:
if (!UpdateVictim())
return;
+ if (me->getVictim()->HasBreakableByDamageCrowdControlAura())
+ {
+ me->InterruptNonMeleeSpells(false);
+ return;
+ }
+
if (SpellTimer <= diff)
{
if (IsViper) //Viper