aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_scripts_full.sql6
-rw-r--r--sql/updates/6771_world_scriptnames.sql2
-rw-r--r--sql/updates/6782_world_scriptnames.sql1
-rw-r--r--sql/updates/6792_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6795_world_creature_template.sql2
-rw-r--r--sql/updates/6799_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6840_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6857_world_scriptnames.sql2
-rw-r--r--sql/updates/6877_world_script_waypoints.sql1
-rw-r--r--sql/updates/6877_world_scriptnames.sql1
-rw-r--r--sql/updates/6881_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6898_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6901_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6903_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6915_world_spell_proc_event.sql2
-rw-r--r--sql/updates/6945_world_scriptnames.sql1
-rw-r--r--sql/updates/6953_world_trinity_string.sql3
-rw-r--r--sql/updates/6959_characters_character_aura.sql2
-rw-r--r--sql/updates/6959_characters_pet_aura.sql2
-rw-r--r--sql/world.sql1
-rw-r--r--src/bindings/scripts/VC90/90ScriptDev2.vcproj10
-rw-r--r--src/bindings/scripts/scripts/northrend/borean_tundra.cpp93
-rw-r--r--src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp6
-rw-r--r--src/game/BattleGround.cpp11
-rw-r--r--src/game/DynamicObject.h2
-rw-r--r--src/game/Language.h3
-rw-r--r--src/game/Level3.cpp1
-rw-r--r--src/game/Spell.cpp8
-rw-r--r--src/game/SpellAuraEffects.cpp7
-rw-r--r--src/game/SpellAuras.h4
-rw-r--r--src/game/SpellEffects.cpp20
-rw-r--r--src/game/SpellMgr.cpp6
-rw-r--r--src/game/Unit.cpp15
33 files changed, 143 insertions, 83 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index b2fa876567d..61cc29c2bd3 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -1,7 +1,11 @@
-- Up to TC2 6928
-- Cleanup first
+UPDATE `instance_template` SET `Script`='';
+UPDATE `item_template` SET `ScriptName`='';
UPDATE `creature_template` SET `ScriptName`='';
+UPDATE `gameobject_template` SET `ScriptName`='';
+
/* WORLD BOSS */
UPDATE `creature_template` SET `ScriptName`='boss_ysondre' WHERE `entry`=14887;
@@ -389,6 +393,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_beryl_sorcerer' WHERE `entry`=2
UPDATE `creature_template` SET `ScriptName`='npc_imprisoned_beryl_sorcerer' WHERE `entry` = 25478;
UPDATE `creature_template` SET `ScriptName`='npc_mootoo_the_younger' WHERE `entry`= 25504;
UPDATE `creature_template` SET `ScriptName`='npc_bonker_togglevolt' WHERE `entry`= 25589;
+UPDATE `creature_template` SET `ScriptName`='npc_fezzix_geartwist' WHERE `entry`=25849;
/* BURNING STEPPES */
UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563;
@@ -1214,7 +1219,6 @@ UPDATE `creature_template` SET `ScriptName`='mob_toc5_mage' WHERE entry IN (3470
UPDATE `creature_template` SET `ScriptName`='mob_toc5_shaman' WHERE entry IN (34701, 35571);
UPDATE `creature_template` SET `ScriptName`='mob_toc5_hunter' WHERE entry IN (34657, 35570);
UPDATE `creature_template` SET `ScriptName`='mob_toc5_rogue' WHERE entry IN (34703, 35617);
-UPDATE `creature_template` SET `ScriptName`='mob_toc5_risen_ghoul' WHERE entry IN (35545, 35564);
UPDATE `creature_template` SET `ScriptName`='npc_risen_ghoul' WHERE `entry` IN (35545,35564);
UPDATE `creature_template` SET `ScriptName`='boss_black_knight' WHERE `entry`=35451;
UPDATE `creature_template` SET `ScriptName`='boss_eadric' WHERE `entry`=35119;
diff --git a/sql/updates/6771_world_scriptnames.sql b/sql/updates/6771_world_scriptnames.sql
index 5f617ed3738..07490c90d7a 100644
--- a/sql/updates/6771_world_scriptnames.sql
+++ b/sql/updates/6771_world_scriptnames.sql
@@ -6,9 +6,9 @@ UPDATE `creature_template` SET `ScriptName`='mob_toc5_mage' WHERE entry IN (3470
UPDATE `creature_template` SET `ScriptName`='mob_toc5_shaman' WHERE entry IN (34701, 35571);
UPDATE `creature_template` SET `ScriptName`='mob_toc5_hunter' WHERE entry IN (34657, 35570);
UPDATE `creature_template` SET `ScriptName`='mob_toc5_rogue' WHERE entry IN (34703, 35617);
-UPDATE `creature_template` SET `ScriptName`='mob_toc5_risen_ghoul' WHERE entry IN (35545, 35564);
UPDATE `creature_template` SET `ScriptName`='npc_risen_ghoul' WHERE `entry` IN (35545,35564);
UPDATE `creature_template` SET `ScriptName`='boss_black_knight' WHERE `entry`=35451;
UPDATE `creature_template` SET `ScriptName`='boss_eadric' WHERE `entry`=35119;
UPDATE `creature_template` SET `ScriptName`='boss_paletress' WHERE `entry`=34928;
UPDATE `creature_template` SET `ScriptName`='npc_memory' WHERE `entry` IN (35052,35041,35033,35046,35043,35047,35044,35039, 35034, 35049, 35030, 34942, 35050, 35042, 35045, 35037, 35031, 35038, 35029,35048,35032,35028,35040,35036,35051);
+
diff --git a/sql/updates/6782_world_scriptnames.sql b/sql/updates/6782_world_scriptnames.sql
index 81791ab24cd..4b35a3b59b9 100644
--- a/sql/updates/6782_world_scriptnames.sql
+++ b/sql/updates/6782_world_scriptnames.sql
@@ -1,2 +1 @@
UPDATE `creature_template` SET `ScriptName`='npc_risen_ghoul' WHERE `entry` IN (35545, 35564);
-
diff --git a/sql/updates/6792_world_spell_proc_event.sql b/sql/updates/6792_world_spell_proc_event.sql
index feb0aac514b..b4c82e0f6ae 100644
--- a/sql/updates/6792_world_spell_proc_event.sql
+++ b/sql/updates/6792_world_spell_proc_event.sql
@@ -1 +1 @@
-UPDATE spell_proc_event SET SpellFamilyMask0 = 0x04000000, SpellFamilyMask1 = 0x10000000 WHERE entry IN (49208, 56834, 56835); \ No newline at end of file
+UPDATE spell_proc_event SET SpellFamilyMask0 = 0x04000000, SpellFamilyMask1 = 0x10000000 WHERE entry IN (49208, 56834, 56835);
diff --git a/sql/updates/6795_world_creature_template.sql b/sql/updates/6795_world_creature_template.sql
index f8b302a7e7d..f25af34eb68 100644
--- a/sql/updates/6795_world_creature_template.sql
+++ b/sql/updates/6795_world_creature_template.sql
@@ -1 +1 @@
-UPDATE `creature_template` SET `mindmg` = '97', `maxdmg` = '195', `attackpower` = '35', `minrangedmg` = '72', `maxrangedmg` = '157' WHERE `entry` = 28017; \ No newline at end of file
+UPDATE `creature_template` SET `mindmg` = '97', `maxdmg` = '195', `attackpower` = '35', `minrangedmg` = '72', `maxrangedmg` = '157' WHERE `entry` = 28017;
diff --git a/sql/updates/6799_world_spell_proc_event.sql b/sql/updates/6799_world_spell_proc_event.sql
index ba127dbf22b..487099eb68b 100644
--- a/sql/updates/6799_world_spell_proc_event.sql
+++ b/sql/updates/6799_world_spell_proc_event.sql
@@ -1 +1 @@
-UPDATE spell_proc_event SET SchoolMask = 4, spellFamilyMask1 = 200776, spellFamilyMask0 = 146800663 WHERE entry = 11129; \ No newline at end of file
+UPDATE spell_proc_event SET SchoolMask = 4, spellFamilyMask1 = 200776, spellFamilyMask0 = 146800663 WHERE entry = 11129;
diff --git a/sql/updates/6840_world_spell_proc_event.sql b/sql/updates/6840_world_spell_proc_event.sql
index 7711683545f..76f8cfc0efd 100644
--- a/sql/updates/6840_world_spell_proc_event.sql
+++ b/sql/updates/6840_world_spell_proc_event.sql
@@ -2,4 +2,4 @@
-- Change max procs per minute (ppm) to be read from the dbc
UPDATE spell_proc_event
SET ppmRate = 0
-WHERE entry = 20375; \ No newline at end of file
+WHERE entry = 20375;
diff --git a/sql/updates/6857_world_scriptnames.sql b/sql/updates/6857_world_scriptnames.sql
index c24c640367d..23eaf24b35c 100644
--- a/sql/updates/6857_world_scriptnames.sql
+++ b/sql/updates/6857_world_scriptnames.sql
@@ -1 +1 @@
-UPDATE `creature_template` SET `ScriptName` = 'valiant_challenge' WHERE `entry` = 33518; \ No newline at end of file
+UPDATE `creature_template` SET `ScriptName` = 'valiant_challenge' WHERE `entry` = 33518;
diff --git a/sql/updates/6877_world_script_waypoints.sql b/sql/updates/6877_world_script_waypoints.sql
index 3e86967627d..428a5312f68 100644
--- a/sql/updates/6877_world_script_waypoints.sql
+++ b/sql/updates/6877_world_script_waypoints.sql
@@ -115,4 +115,3 @@ INSERT INTO `script_waypoint` VALUES
(349,113,-9264.73,-2292.92,70.0089,0,''),
(349,114,-9272.24,-2293.79,68.6096,0,''),
(349,115,-9277.03,-2295.98,68.1135,10000,'');
-
diff --git a/sql/updates/6877_world_scriptnames.sql b/sql/updates/6877_world_scriptnames.sql
index 6b665d35a57..8c57960b4b7 100644
--- a/sql/updates/6877_world_scriptnames.sql
+++ b/sql/updates/6877_world_scriptnames.sql
@@ -1,2 +1 @@
UPDATE `creature_template` SET `ScriptName`='npc_corporal_keeshan' WHERE `entry`=349;
-
diff --git a/sql/updates/6881_world_spell_proc_event.sql b/sql/updates/6881_world_spell_proc_event.sql
index b31464804e0..f78a9735e9e 100644
--- a/sql/updates/6881_world_spell_proc_event.sql
+++ b/sql/updates/6881_world_spell_proc_event.sql
@@ -1 +1 @@
-UPDATE `spell_proc_event` SET procFlags=procFlags|4 WHERE `entry` in (53486,53488); -- Fix Art of War to only proc from Critical Hits \ No newline at end of file
+UPDATE `spell_proc_event` SET procFlags=procFlags|4 WHERE `entry` in (53486,53488); -- Fix Art of War to only proc from Critical Hits
diff --git a/sql/updates/6898_world_spell_proc_event.sql b/sql/updates/6898_world_spell_proc_event.sql
index 4751b9d29b4..bad7690badc 100644
--- a/sql/updates/6898_world_spell_proc_event.sql
+++ b/sql/updates/6898_world_spell_proc_event.sql
@@ -1,2 +1,2 @@
DELETE FROM spell_proc_event WHERE entry = 58387;
-INSERT INTO spell_proc_event VALUES(58387, 0, 4, 16384, 64, 0, 16, 0, 0, 0, 0); -- Glyph of Sunder Armor \ No newline at end of file
+INSERT INTO spell_proc_event VALUES(58387, 0, 4, 16384, 64, 0, 16, 0, 0, 0, 0); -- Glyph of Sunder Armor
diff --git a/sql/updates/6901_world_spell_proc_event.sql b/sql/updates/6901_world_spell_proc_event.sql
index fab8748d36a..6d03c08ebf7 100644
--- a/sql/updates/6901_world_spell_proc_event.sql
+++ b/sql/updates/6901_world_spell_proc_event.sql
@@ -1,2 +1,2 @@
DELETE FROM spell_proc_event WHERE entry = 58375;
-INSERT INTO spell_proc_event VALUES(58375, 0, 4, 0, 0x200, 0, 0x10, 0, 0, 0, 0); -- Glyph of Blocking \ No newline at end of file
+INSERT INTO spell_proc_event VALUES(58375, 0, 4, 0, 0x200, 0, 0x10, 0, 0, 0, 0); -- Glyph of Blocking
diff --git a/sql/updates/6903_world_spell_proc_event.sql b/sql/updates/6903_world_spell_proc_event.sql
index d405bfbb2bf..b15e41ead7d 100644
--- a/sql/updates/6903_world_spell_proc_event.sql
+++ b/sql/updates/6903_world_spell_proc_event.sql
@@ -1 +1 @@
-UPDATE spell_proc_event SET customChance = 100 WHERE entry = 33757; \ No newline at end of file
+UPDATE spell_proc_event SET customChance = 100 WHERE entry = 33757;
diff --git a/sql/updates/6915_world_spell_proc_event.sql b/sql/updates/6915_world_spell_proc_event.sql
index 5ef9121cc44..ed974e92fb2 100644
--- a/sql/updates/6915_world_spell_proc_event.sql
+++ b/sql/updates/6915_world_spell_proc_event.sql
@@ -1 +1 @@
-UPDATE spell_proc_event SET spellFamilyMask0 = spellFamilyMask0 | 0x100, customChance = 100 WHERE entry IN (16198, 16180, 16196); \ No newline at end of file
+UPDATE spell_proc_event SET spellFamilyMask0 = spellFamilyMask0 | 0x100, customChance = 100 WHERE entry IN (16198, 16180, 16196);
diff --git a/sql/updates/6945_world_scriptnames.sql b/sql/updates/6945_world_scriptnames.sql
new file mode 100644
index 00000000000..1de4fa2218e
--- /dev/null
+++ b/sql/updates/6945_world_scriptnames.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='npc_fezzix_geartwist' WHERE `entry`=25849;
diff --git a/sql/updates/6953_world_trinity_string.sql b/sql/updates/6953_world_trinity_string.sql
new file mode 100644
index 00000000000..aa6dede9ec5
--- /dev/null
+++ b/sql/updates/6953_world_trinity_string.sql
@@ -0,0 +1,3 @@
+DELETE FROM `trinity_string` WHERE `entry`=5021;
+INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES (5021, 'Armor: %u');
+
diff --git a/sql/updates/6959_characters_character_aura.sql b/sql/updates/6959_characters_character_aura.sql
new file mode 100644
index 00000000000..533adfb27c4
--- /dev/null
+++ b/sql/updates/6959_characters_character_aura.sql
@@ -0,0 +1,2 @@
+DELETE FROM `character_aura` WHERE `spell` IN (61248, 58105, 61265);
+ \ No newline at end of file
diff --git a/sql/updates/6959_characters_pet_aura.sql b/sql/updates/6959_characters_pet_aura.sql
new file mode 100644
index 00000000000..e3ef6f3ffde
--- /dev/null
+++ b/sql/updates/6959_characters_pet_aura.sql
@@ -0,0 +1,2 @@
+DELETE FROM `pet_aura` WHERE `spell` IN (61248, 58105, 61265);
+ \ No newline at end of file
diff --git a/sql/world.sql b/sql/world.sql
index 1c99fd11847..ab5ef584578 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -7657,6 +7657,7 @@ INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_
(5018, '[Heroic reset time: %s]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5019, '[Mountable]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5020, 'Phasemask: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(5021, 'Armor: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(6613, '|cfff00000[GM Announcement]: %s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(6614, 'Notification to GM''s - ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(6615, '|cffffff00[|c1f40af20GM Announce by|r |cffff0000%s|cffffff00]:|r %s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
index 70d9721b719..f989fdb73d4 100644
--- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="TrinityScript"
ProjectGUID="{4295C8A9-79B7-4354-8064-F05FB9CA0C96}"
RootNamespace="ScriptDev2"
@@ -459,7 +459,7 @@
RelativePath="..\scripts\eastern_kingdoms\loch_modan.cpp"
>
</File>
- <File
+ <File
RelativePath="..\scripts\eastern_kingdoms\redridge_mountains.cpp"
>
</File>
@@ -658,7 +658,7 @@
<Filter
Name="Deadmines"
>
- <File
+ <File
RelativePath="..\scripts\eastern_kingdoms\deadmines\boss_mr_smite.cpp"
>
</File>
@@ -2872,10 +2872,6 @@
RelativePath="..\include\sc_instance.h"
>
</File>
- <File
- RelativePath="..\include\sc_item.h"
- >
- </File>
</Filter>
<Filter
Name="system"
diff --git a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp
index 99bc3527edb..539240caf8a 100644
--- a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp
+++ b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp
@@ -533,13 +533,13 @@ enum eJenny
struct TRINITY_DLL_DECL npc_jennyAI : public ScriptedAI
{
- npc_jennyAI(Creature *c) : ScriptedAI(c) {}
+ npc_jennyAI(Creature* pCreature) : ScriptedAI(pCreature) {}
bool setCrateNumber;
void Reset()
{
- if(!setCrateNumber == false)
+ if(!setCrateNumber)
setCrateNumber = true;
m_creature->SetReactState(REACT_PASSIVE);
@@ -561,19 +561,6 @@ struct TRINITY_DLL_DECL npc_jennyAI : public ScriptedAI
DoCast(m_creature, SPELL_DROP_CRATE, true);
}
- void MoveInLineOfSight(Unit* pWho)
- {
- if(pWho->GetEntry() == NPC_FEZZIX_GEARTWIST)
- {
- if(CAST_PLR(m_creature->GetOwner())->GetQuestStatus(QUEST_LOADER_UP) == QUEST_STATUS_INCOMPLETE && m_creature->GetAura(SPELL_CRATES_CARRIED))
- {
- DoCast(CAST_PLR(m_creature->GetOwner()), SPELL_GIVE_JENNY_CREDIT, true); // Maybe is not working.
- CAST_PLR(m_creature->GetOwner())->CompleteQuest(QUEST_LOADER_UP);
- m_creature->DisappearAndDie();
- }
- }
- }
-
void UpdateAI(const uint32 diff)
{
if(setCrateNumber)
@@ -582,8 +569,11 @@ struct TRINITY_DLL_DECL npc_jennyAI : public ScriptedAI
setCrateNumber = false;
}
- if (setCrateNumber == false && !m_creature->HasAura(SPELL_CRATES_CARRIED))
+ if (!setCrateNumber && !m_creature->HasAura(SPELL_CRATES_CARRIED))
m_creature->DisappearAndDie();
+
+ if (!UpdateVictim())
+ return;
}
};
@@ -593,7 +583,45 @@ CreatureAI* GetAI_npc_jenny(Creature *pCreature)
}
/*######
-## npc_npc_nesingwary_trapper
+## npc_fezzix_geartwist
+######*/
+
+struct TRINITY_DLL_DECL npc_fezzix_geartwistAI : public ScriptedAI
+{
+ npc_fezzix_geartwistAI(Creature* pCreature) : ScriptedAI(pCreature) {}
+
+ void MoveInLineOfSight(Unit* pWho)
+ {
+ ScriptedAI::MoveInLineOfSight(pWho);
+
+ if (pWho->GetTypeId() != TYPEID_UNIT)
+ return;
+
+ if (pWho->GetEntry() == NPC_JENNY && m_creature->IsWithinDistInMap(pWho, 10.0f))
+ {
+ if (Unit* pOwner = pWho->GetOwner())
+ {
+ if (pOwner->GetTypeId() == TYPEID_PLAYER)
+ {
+ if (pWho->HasAura(SPELL_CRATES_CARRIED))
+ {
+ pOwner->CastSpell(pOwner, SPELL_GIVE_JENNY_CREDIT, true); // Maybe is not working.
+ CAST_PLR(pOwner)->CompleteQuest(QUEST_LOADER_UP);
+ CAST_CRE(pWho)->DisappearAndDie();
+ }
+ }
+ }
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_fezzix_geartwist(Creature* pCreature)
+{
+ return new npc_fezzix_geartwistAI(pCreature);
+}
+
+/*######
+## npc_nesingwary_trapper
######*/
enum eNesingwaryTrapper
@@ -749,15 +777,18 @@ enum eLurgglbr
struct TRINITY_DLL_DECL npc_lurgglbrAI : public npc_escortAI
{
- npc_lurgglbrAI(Creature* c) : npc_escortAI(c){}
+ npc_lurgglbrAI(Creature* pCreature) : npc_escortAI(pCreature){}
uint32 IntroTimer;
uint32 IntroPhase;
void Reset()
{
- IntroTimer = 0;
- IntroPhase = 0;
+ if (!HasEscortState(STATE_ESCORT_ESCORTING))
+ {
+ IntroTimer = 0;
+ IntroPhase = 0;
+ }
}
void WaypointReached(uint32 i)
@@ -825,6 +856,9 @@ struct TRINITY_DLL_DECL npc_lurgglbrAI : public npc_escortAI
} else IntroTimer -= diff;
}
npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
}
};
@@ -1795,7 +1829,7 @@ enum Mootoo_the_Younger_Entries
QUEST_ESCAPING_THE_MIST =11664
};
bool QuestAccept_npc_mootoo_the_younger(Player* pPlayer, Creature* pCreature, Quest const* quest)
-{
+{
if (quest->GetQuestId()==QUEST_ESCAPING_THE_MIST)
{
switch (pPlayer->GetTeam())
@@ -1818,11 +1852,11 @@ struct TRINITY_DLL_DECL npc_mootoo_the_youngerAI : public npc_escortAI
void Reset()
{
- SetDespawnAtFar(false);
+ SetDespawnAtFar(false);
}
void JustDied(Unit* killer)
- {
+ {
if (Player* pPlayer=GetPlayerForEscort())
pPlayer->FailQuest(QUEST_ESCAPING_THE_MIST);
}
@@ -1855,7 +1889,7 @@ struct TRINITY_DLL_DECL npc_mootoo_the_youngerAI : public npc_escortAI
if (pPlayer)
pPlayer->GroupEventHappens(QUEST_ESCAPING_THE_MIST, m_creature);
SetRun(true);
- break;
+ break;
}
}
};
@@ -1880,7 +1914,7 @@ enum Script_Texts_Bonker_Togglevolt
};
bool QuestAccept_npc_bonker_togglevolt(Player* pPlayer, Creature* pCreature, Quest const* quest)
-{
+{
if (quest->GetQuestId()==QUEST_GET_ME_OUTA_HERE)
{
switch (pPlayer->GetTeam())
@@ -1913,9 +1947,9 @@ struct TRINITY_DLL_DECL npc_bonker_togglevoltAI : public npc_escortAI
if (Player* pPlayer = GetPlayerForEscort())
pPlayer->FailQuest(QUEST_ESCAPING_THE_MIST);
}
-
+
void UpdateEscortAI(const uint32 diff)
- {
+ {
if (GetAttack() && UpdateVictim())
{
if(Bonker_agro==0)
@@ -2016,6 +2050,11 @@ void AddSC_borean_tundra()
newscript->RegisterSelf();
newscript = new Script;
+ newscript->Name = "npc_fezzix_geartwist";
+ newscript->GetAI = &GetAI_npc_fezzix_geartwist;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
newscript->Name = "npc_nesingwary_trapper";
newscript->GetAI = &GetAI_npc_nesingwary_trapper;
newscript->RegisterSelf();
diff --git a/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp
index f8d78013c27..1355fa5f245 100644
--- a/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp
+++ b/src/bindings/scripts/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp
@@ -348,17 +348,14 @@ struct TRINITY_DLL_DECL boss_sartharionAI : public ScriptedAI
case NPC_TENEBRON:
iTextId = SAY_SARTHARION_CALL_TENEBRON;
pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aTene[1].m_fX, m_aTene[1].m_fY, m_aTene[1].m_fZ);
- DoAddAuraToAllHostilePlayers(SPELL_POWER_OF_TENEBRON);
break;
case NPC_SHADRON:
iTextId = SAY_SARTHARION_CALL_SHADRON;
pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aShad[1].m_fX, m_aShad[1].m_fY, m_aShad[1].m_fZ);
- DoAddAuraToAllHostilePlayers(SPELL_POWER_OF_SHADRON);
break;
case NPC_VESPERON:
iTextId = SAY_SARTHARION_CALL_VESPERON;
pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ);
- DoAddAuraToAllHostilePlayers(SPELL_POWER_OF_VESPERON);
break;
}
@@ -685,9 +682,10 @@ struct TRINITY_DLL_DECL dummy_dragonAI : public ScriptedAI
DoScriptText(iTextId, m_creature);
+ m_creature->RemoveOwnedAura(uiSpellId, AURA_REMOVE_BY_DEFAULT);
+
if (pInstance)
{
- pInstance->DoRemoveAurasDueToSpellOnPlayers(uiSpellId);
// not if solo mini-boss fight
if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
return;
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 19643a6003e..1828a04fa8a 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -428,16 +428,17 @@ void BattleGround::Update(uint32 diff)
{
plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
// remove auras with duration lower than 30s
- Unit::AuraMap & auraMap = plr->GetOwnedAuras();
- for (Unit::AuraMap::iterator iter = auraMap.begin(); iter != auraMap.end();)
+ Unit::AuraApplicationMap & auraMap = plr->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();)
{
- Aura * aura = iter->second;
+ AuraApplication * aurApp = iter->second;
+ Aura * aura = aurApp->GetBase();
if (!aura->IsPermanent()
&& aura->GetDuration() <= 30*IN_MILISECONDS
- && aura->IsPositive(plr)
+ && aurApp->IsPositive()
&& (!(aura->GetSpellProto()->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
&& (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY)))
- plr->RemoveOwnedAura(iter);
+ plr->RemoveAura(iter);
else
++iter;
}
diff --git a/src/game/DynamicObject.h b/src/game/DynamicObject.h
index de94b5877bd..ff18cdcb261 100644
--- a/src/game/DynamicObject.h
+++ b/src/game/DynamicObject.h
@@ -58,4 +58,4 @@ class DynamicObject : public WorldObject, public GridObject<DynamicObject>
int32 m_duration; // for non-aura dynobjects
Aura * m_aura;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/game/Language.h b/src/game/Language.h
index 617b7f8c01d..4ccafe552d7 100644
--- a/src/game/Language.h
+++ b/src/game/Language.h
@@ -886,7 +886,8 @@ enum TrinityStrings
LANG_HEROIC = 5018,
LANG_MOUNTABLE = 5019,
LANG_NPCINFO_PHASEMASK = 5020,
- // Room for more Trinity strings 5021-9999
+ LANG_NPCINFO_ARMOR = 5021,
+ // Room for more Trinity strings 5022-9999
// Used for GM Announcements
LANG_GM_BROADCAST = 6613,
LANG_GM_NOTIFY = 6614,
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 7aee776c710..203002e1501 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -4612,6 +4612,7 @@ bool ChatHandler::HandleNpcInfoCommand(const char* /*args*/)
PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid,cInfo->pickpocketLootId,cInfo->SkinLootId);
PSendSysMessage(LANG_NPCINFO_DUNGEON_ID, target->GetInstanceId());
PSendSysMessage(LANG_NPCINFO_PHASEMASK, target->GetPhaseMask());
+ PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor());
PSendSysMessage(LANG_NPCINFO_POSITION,float(target->GetPositionX()), float(target->GetPositionY()), float(target->GetPositionZ()));
if(const CreatureData* const linked = target->GetLinkedRespawnCreatureData())
if(CreatureInfo const *master = GetCreatureInfo(linked->id))
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 9e1f632ad33..76fa2922d19 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5075,10 +5075,14 @@ SpellCastResult Spell::CheckCast(bool strict)
//custom check
switch(m_spellInfo->Id)
{
- case SPELL_TAG_MURLOC_30877:
- if (!m_targets.getUnitTarget() || (m_targets.getUnitTarget() && (m_targets.getUnitTarget()->HasAura(SPELL_TAG_MURLOC_30877) || m_targets.getUnitTarget()->GetTypeId() != TYPEID_UNIT || (m_targets.getUnitTarget()->GetTypeId() == TYPEID_UNIT && ((Creature*)m_targets.getUnitTarget())->GetEntry() != 17326 ))))// Tag Murloc, Blacksilt Scout
+ // Tag Murloc
+ case 30877:
+ {
+ Unit* target = m_targets.getUnitTarget();
+ if (!target || target->GetEntry() != 17326)
return SPELL_FAILED_BAD_TARGETS;
break;
+ }
case 61336:
if(m_caster->GetTypeId() != TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
return SPELL_FAILED_ONLY_SHAPESHIFT;
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp
index 14161feac2e..1492d586943 100644
--- a/src/game/SpellAuraEffects.cpp
+++ b/src/game/SpellAuraEffects.cpp
@@ -5681,6 +5681,13 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
target->RemoveAurasDueToSpell(spellId);
break;
}
+ // Tag Murloc
+ case 30877:
+ {
+ // Tag/untag Blacksilt Scout
+ target->SetEntry(apply ? 17654 : 17326);
+ break;
+ }
//Summon Fire Elemental
case 40133:
{
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index 309e646edcc..9dbe3aec84d 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -157,10 +157,6 @@ class TRINITY_DLL_SPEC Aura
AuraApplication * GetApplicationOfTarget (uint64 const & guid) { ApplicationMap::iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
bool IsAppliedOnTarget (uint64 const & guid) const { return m_applications.find(guid) != m_applications.end(); }
- bool IsPositive(Unit * const target) const { return (GetApplicationOfTarget(target->GetGUID()))->IsPositive(); }
- bool GetEffectMask(Unit * const target) const { return (GetApplicationOfTarget(target->GetGUID()))->GetEffectMask(); }
- uint8 GetSlot(Unit * const target) const { return (GetApplicationOfTarget(target->GetGUID()))->GetSlot(); }
- bool HasEffect(Unit * const target, uint8 eff) const { return (GetApplicationOfTarget(target->GetGUID()))->HasEffect(eff); }
void SetNeedClientUpdateForTargets() const;
void HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, bool apply);
private:
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 147973874bf..24c2ded7321 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3742,11 +3742,15 @@ void Spell::EffectDispel(uint32 i)
for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
Aura * aura = itr->second;
+ AuraApplication * aurApp = aura->GetApplicationOfTarget(unitTarget->GetGUID());
+ if (!aurApp)
+ continue;
+
if ((1<<aura->GetSpellProto()->Dispel) & dispelMask)
{
if(aura->GetSpellProto()->Dispel == DISPEL_MAGIC)
{
- bool positive = aura->IsPositive(unitTarget) ? (!(aura->GetSpellProto()->AttributesEx & SPELL_ATTR_EX_NEGATIVE)) : false;
+ bool positive = aurApp->IsPositive() ? (!(aura->GetSpellProto()->AttributesEx & SPELL_ATTR_EX_NEGATIVE)) : false;
// do not remove positive auras if friendly target
// negative auras if non-friendly target
@@ -6812,10 +6816,12 @@ void Spell::EffectDispelMechanic(uint32 i)
std::queue < std::pair < uint32, uint64 > > dispel_list;
- Unit::AuraMap& Auras = unitTarget->GetOwnedAuras();
- for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); iter++)
+ Unit::AuraMap const& auras = unitTarget->GetOwnedAuras();
+ for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
- Aura * aura = iter->second;
+ Aura * aura = itr->second;
+ if (!aura->GetApplicationOfTarget(unitTarget->GetGUID()))
+ continue;
if((GetAllSpellMechanicMask(aura->GetSpellProto()) & (1<<(mechanic))) && GetDispelChance(aura->GetCaster(), aura->GetId()))
{
dispel_list.push(std::make_pair(aura->GetId(), aura->GetCasterGUID() ) );
@@ -7173,10 +7179,14 @@ void Spell::EffectStealBeneficialBuff(uint32 i)
for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
Aura * aura = itr->second;
+ AuraApplication * aurApp = aura->GetApplicationOfTarget(unitTarget->GetGUID());
+ if (!aurApp)
+ continue;
+
if ((1<<aura->GetSpellProto()->Dispel) & dispelMask)
{
// Need check for passive? this
- if (!aura->IsPositive(unitTarget) || aura->IsPassive() || aura->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_NOT_STEALABLE)
+ if (!aurApp->IsPositive() || aura->IsPassive() || aura->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_NOT_STEALABLE)
continue;
bool dispel_charges = aura->GetSpellProto()->AttributesEx7 & SPELL_ATTR_EX7_DISPEL_CHARGES;
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 8faa28b5e8b..98c4273ffde 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -767,7 +767,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
case 50524: // Runic Power Feed
return false;
case 12042: // Arcane Power
- case SPELL_TAG_MURLOC_30877: // Tag Murloc
+ case 30877: // Tag Murloc
return true;
}
@@ -3807,10 +3807,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->AttributesEx5 |= SPELL_ATTR_EX5_START_PERIODIC_AT_APPLY;
count++;
break;
- case SPELL_TAG_MURLOC_30877:
- spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_NEARBY_ENTRY;
- spellInfo->EffectImplicitTargetB[0] = 0;
- break;
default:
break;
}
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 24f8d7d7ba0..ce560a80c8c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2210,9 +2210,9 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
{
// Get total damage bonus from auras
int32 current_dmg = 0;
- std::pair<AuraMap::const_iterator, AuraMap::const_iterator> range = pVictim->GetOwnedAuras().equal_range(44413);
- for (AuraMap::const_iterator iter = range.first; iter != range.second; ++iter)
- if (AuraEffect const * bonusEff = iter->second->GetEffect(0))
+ std::pair<AuraApplicationMap::const_iterator, AuraApplicationMap::const_iterator> range = pVictim->GetAppliedAuras().equal_range(44413);
+ for (AuraApplicationMap::const_iterator iter = range.first; iter != range.second; ++iter)
+ if (AuraEffect const * bonusEff = iter->second->GetBase()->GetEffect(0))
current_dmg += bonusEff->GetAmount();
int32 new_dmg = (int32)*absorb * aurEff->GetAmount() / 100;
@@ -4292,14 +4292,15 @@ void Unit::RemoveArenaAuras(bool onleave)
{
// in join, remove positive buffs, on end, remove negative
// used to remove positive visible auras in arenas
- for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
+ for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
- Aura const * aura = iter->second;
+ AuraApplication const * aurApp = iter->second;
+ Aura const * aura = aurApp->GetBase();
if ( !(aura->GetSpellProto()->AttributesEx4 & (1<<21)) // don't remove stances, shadowform, pally/hunter auras
&& !aura->IsPassive() // don't remove passive auras
&& (!(aura->GetSpellProto()->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY) || !(aura->GetSpellProto()->Attributes & SPELL_ATTR_UNK8)) // not unaffected by invulnerability auras or not having that unknown flag (that seemed the most probable)
- && (aura->IsPositive(this) ^ onleave)) // remove positive buffs on enter, negative buffs on leave
- RemoveOwnedAura(iter);
+ && (aurApp->IsPositive() ^ onleave)) // remove positive buffs on enter, negative buffs on leave
+ RemoveAura(iter);
else
++iter;
}