diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 5 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 26 |
2 files changed, 17 insertions, 14 deletions
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: |