diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/authserver/authserver.conf.dist | 8 | ||||
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.h | 2 | ||||
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 21 | ||||
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.h | 2 | ||||
-rw-r--r-- | src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp | 8 | ||||
-rw-r--r-- | src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp | 59 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 32 | ||||
-rw-r--r-- | src/server/worldserver/worldserver.conf.dist | 8 |
9 files changed, 92 insertions, 50 deletions
diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist index 0a50601f86d..3c811eda3b3 100644 --- a/src/server/authserver/authserver.conf.dist +++ b/src/server/authserver/authserver.conf.dist @@ -82,11 +82,11 @@ UseProcessors = 0 # # ProcessPriority # Description: Process priority setting for Windows and Linux based systems. -# Details: On Linux, a nice value of -15 is used. On Windows, process is set to HIGH class. -# Default: 1 - (High) -# 0 - (Normal) +# Details: On Linux, a nice value of -15 is used. (requires superuser). On Windows, process is set to HIGH class. +# Default: 0 - (Normal) +# 1 - (High) -ProcessPriority = 1 +ProcessPriority = 0 # # RealmsStateUpdateDelay diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 055f6b6c2bc..000107dfa56 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1498,7 +1498,7 @@ void Battleground::RemovePlayerFromResurrectQueue(uint64 player_guid) } } -void Battleground::RelocateDeadPlayers(uint32 queueIndex) +void Battleground::RelocateDeadPlayers(uint64 queueIndex) { // Those who are waiting to resurrect at this node are taken to the closest own node's graveyard std::vector<uint64>& ghostList = m_ReviveQueue[queueIndex]; diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 264e2864a34..e52f08caa3b 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -381,7 +381,7 @@ class Battleground void RemovePlayerFromResurrectQueue(uint64 player_guid); /// Relocate all players in ReviveQueue to the closest graveyard - void RelocateDeadPlayers(uint32 queueIndex); + void RelocateDeadPlayers(uint64 queueIndex); void StartBattleground(); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 1213b14ead4..60bbda1a2fb 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -317,6 +317,12 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) condMeets = unit->HasUnitState(ConditionValue1); break; } + case CONDITION_CREATURE_TYPE: + { + if (Creature* creature = object->ToCreature()) + condMeets = creature->GetCreatureTemplate()->type == ConditionValue1; + break; + } default: condMeets = false; break; @@ -483,6 +489,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition() case CONDITION_UNIT_STATE: mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER; break; + case CONDITION_CREATURE_TYPE: + mask |= GRID_MAP_TYPE_MASK_CREATURE; + break; default: ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!"); break; @@ -2025,9 +2034,15 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } break; } - case CONDITION_UNUSED_24: - TC_LOG_ERROR(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_24 in `conditions` table - ignoring"); - return false; + case CONDITION_CREATURE_TYPE: + { + if (!cond->ConditionValue1 || cond->ConditionValue1 > CREATURE_TYPE_GAS_CLOUD) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureType condition has non existing CreatureType in value1 (%u), skipped", cond->ConditionValue1); + return false; + } + break; + } default: break; } diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 2547e6bc8a8..14a933f781b 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -57,7 +57,7 @@ enum ConditionTypes CONDITION_UNIT_STATE = 21, // unitState 0 0 true if unit has unitState CONDITION_MAPID = 22, // map_id 0 0 true if in map_id CONDITION_AREAID = 23, // area_id 0 0 true if in area_id - CONDITION_UNUSED_24 = 24, // + CONDITION_CREATURE_TYPE = 24, // cinfo.type 0 0 true if creature_template.type = value1 CONDITION_SPELL = 25, // spell_id 0 0 true if player has learned spell CONDITION_PHASEMASK = 26, // phasemask 0 0 true if object is in phasemask CONDITION_LEVEL = 27, // level ComparisonType 0 true if unit's level is equal to param1 (param2 can modify the statement) diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index ed7647be89c..99a4ce77623 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -96,13 +96,13 @@ class instance_drak_tharon_keep : public InstanceMapScript float z = creature->GetPositionZ(); if (x < -374.0f && x > -379.0f && y > -820.0f && y < -815.0f && z < 60.0f && z > 58.0f) - NovosCrystalGUIDs[0] = creature->GetGUID(); + NovosSummonerGUIDs[0] = creature->GetGUID(); else if (x < -379.0f && x > -385.0f && y > -820.0f && y < -815.0f && z < 60.0f && z > 58.0f) - NovosCrystalGUIDs[1] = creature->GetGUID(); + NovosSummonerGUIDs[1] = creature->GetGUID(); else if (x < -374.0f && x > -385.0f && y > -827.0f && y < -820.0f && z < 60.0f && z > 58.0f) - NovosCrystalGUIDs[2] = creature->GetGUID(); + NovosSummonerGUIDs[2] = creature->GetGUID(); else if (x < -338.0f && x > -344.0f && y > -727.0f && y < 721.0f && z < 30.0f && z > 26.0f) - NovosCrystalGUIDs[3] = creature->GetGUID(); + NovosSummonerGUIDs[3] = creature->GetGUID(); } uint64 GetData64(uint32 type) const OVERRIDE diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index e5f8cce6c46..e6969d1f519 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -520,6 +520,63 @@ public: } }; + +class spell_oculus_touch_the_nightmare : public SpellScriptLoader +{ + public: + spell_oculus_touch_the_nightmare() : SpellScriptLoader("spell_oculus_touch_the_nightmare") { } + + class spell_oculus_touch_the_nightmare_SpellScript : public SpellScript + { + PrepareSpellScript(spell_oculus_touch_the_nightmare_SpellScript); + + void HandleDamageCalc(SpellEffIndex /*effIndex*/) + { + SetHitDamage(int32(GetCaster()->CountPctFromMaxHealth(30))); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_oculus_touch_the_nightmare_SpellScript::HandleDamageCalc, EFFECT_2, SPELL_EFFECT_SCHOOL_DAMAGE); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_oculus_touch_the_nightmare_SpellScript(); + } +}; + +class spell_oculus_dream_funnel: public SpellScriptLoader +{ + public: + spell_oculus_dream_funnel() : SpellScriptLoader("spell_oculus_dream_funnel") { } + + class spell_oculus_dream_funnel_AuraScript : public AuraScript + { + PrepareAuraScript(spell_oculus_dream_funnel_AuraScript); + + void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated) + { + if (Unit* caster = GetCaster()) + amount = int32(caster->CountPctFromMaxHealth(5)); + + canBeRecalculated = false; + } + + void Register() + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL); + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_oculus_dream_funnel_AuraScript(); + } +}; + void AddSC_oculus() { new npc_verdisa_beglaristrasz_eternos(); @@ -527,4 +584,6 @@ void AddSC_oculus() new npc_ruby_emerald_amber_drake(); new spell_gen_stop_time(); new spell_call_ruby_emerald_amber_drake(); + new spell_oculus_touch_the_nightmare(); + new spell_oculus_dream_funnel(); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 91540bed7b0..da36646c243 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1313,36 +1313,6 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader } }; -class spell_gen_dream_funnel: public SpellScriptLoader -{ - public: - spell_gen_dream_funnel() : SpellScriptLoader("spell_gen_dream_funnel") { } - - class spell_gen_dream_funnel_AuraScript : public AuraScript - { - PrepareAuraScript(spell_gen_dream_funnel_AuraScript); - - void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated) - { - if (GetCaster()) - amount = GetCaster()->GetMaxHealth() * 0.05f; - - canBeRecalculated = false; - } - - void Register() OVERRIDE - { - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL); - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE); - } - }; - - AuraScript* GetAuraScript() const OVERRIDE - { - return new spell_gen_dream_funnel_AuraScript(); - } -}; - class spell_gen_ds_flush_knockback : public SpellScriptLoader { public: @@ -3667,7 +3637,6 @@ void AddSC_generic_spell_scripts() new spell_gen_clone_weapon(); new spell_gen_clone_weapon_aura(); new spell_gen_count_pct_from_max_hp("spell_gen_default_count_pct_from_max_hp"); - new spell_gen_count_pct_from_max_hp("spell_gen_30pct_count_pct_from_max_hp", 30); new spell_gen_count_pct_from_max_hp("spell_gen_50pct_count_pct_from_max_hp", 50); new spell_gen_create_lance(); new spell_gen_creature_permanent_feign_death(); @@ -3676,7 +3645,6 @@ void AddSC_generic_spell_scripts() new spell_gen_defend(); new spell_gen_despawn_self(); new spell_gen_divine_storm_cd_reset(); - new spell_gen_dream_funnel(); new spell_gen_ds_flush_knockback(); new spell_gen_dummy_trigger(); new spell_gen_dungeon_credit(); diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 0a27a7b2106..ce4312672d3 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -161,11 +161,11 @@ UseProcessors = 0 # # ProcessPriority # Description: Process priority setting for Windows and Linux based systems. -# Details: On Linux, a nice value of -15 is used. On Windows, process is set to HIGH class. -# Default: 1 - (High) -# 0 - (Normal) +# Details: On Linux, a nice value of -15 is used. (requires superuser). On Windows, process is set to HIGH class. +# Default: 0 - (Normal) +# 1 - (High) -ProcessPriority = 1 +ProcessPriority = 0 # # Compression |