diff options
-rw-r--r-- | sql/updates/world/2014_09_04_01_creature_text.sql | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 5 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 26 |
3 files changed, 21 insertions, 14 deletions
diff --git a/sql/updates/world/2014_09_04_01_creature_text.sql b/sql/updates/world/2014_09_04_01_creature_text.sql new file mode 100644 index 00000000000..c2f2f6c7242 --- /dev/null +++ b/sql/updates/world/2014_09_04_01_creature_text.sql @@ -0,0 +1,4 @@ +DELETE FROM `creature_text` WHERE `entry`=30215; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(30215, 1, 0, 'Sons of Hodir! I humbly present to you....', 42, 0, 100, 0, 0, 0, 30906, 'Player - Read Pronouncement'), +(30215, 2, 0, 'The Helm of Hodir!', 42, 0, 100, 0, 0, 0, 30907, 'Player - Read Pronouncement'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 86ef8bdc8cc..7ba663beb72 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2573,16 +2573,15 @@ class spell_gen_oracle_wolvar_reputation : public SpellScriptLoader { Player* player = GetCaster()->ToPlayer(); uint32 factionId = GetSpellInfo()->Effects[effIndex].CalcValue(); - int32 repChange = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); + int32 repChange = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); - if (!factionEntry) return; // Set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated) // Not when player already has equal or higher rep with this faction - if (player->GetReputationMgr().GetBaseReputation(factionEntry) < repChange) + if (player->GetReputationMgr().GetReputation(factionEntry) <= repChange) player->GetReputationMgr().SetReputation(factionEntry, repChange); // EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index f17aac51519..e135bb08e73 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -21,15 +21,16 @@ * Scriptnames of files in this file should be prefixed with "spell_q#questID_". */ +#include "CellImpl.h" +#include "CreatureTextMgr.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" #include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "Vehicle.h" -#include "GridNotifiers.h" -#include "GridNotifiersImpl.h" -#include "CellImpl.h" class spell_generic_quest_update_entry_SpellScript : public SpellScript { @@ -1115,12 +1116,12 @@ class spell_q9452_cast_net: public SpellScriptLoader } }; -#define SAY_1 "Sons of Hodir! I humbly present to you..." -#define SAY_2 "The Helm of Hodir!" - enum HodirsHelm { - NPC_KILLCREDIT = 30210 // Hodir's Helm KC Bunny + SAY_1 = 1, + SAY_2 = 2, + NPC_KILLCREDIT = 30210, // Hodir's Helm KC Bunny + NPC_ICE_SPIKE_BUNNY = 30215 }; class spell_q12987_read_pronouncement : public SpellScriptLoader @@ -1137,9 +1138,12 @@ public: // player must cast kill credit and do emote text, according to sniff if (Player* target = GetTarget()->ToPlayer()) { - target->MonsterWhisper(SAY_1, target, true); - target->KilledMonsterCredit(NPC_KILLCREDIT, 0); - target->MonsterWhisper(SAY_2, target, true); + if (Creature* trigger = target->FindNearestCreature(NPC_ICE_SPIKE_BUNNY, 25.0f)) + { + sCreatureTextMgr->SendChat(trigger, SAY_1, target, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target); + target->KilledMonsterCredit(NPC_KILLCREDIT); + sCreatureTextMgr->SendChat(trigger, SAY_2, target, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target); + } } } @@ -2096,7 +2100,7 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader } }; -// 52694 - Recall Eye of Acherus +// 52694 - Recall Eye of Acherus class spell_q12641_recall_eye_of_acherus : public SpellScriptLoader { public: |