aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/authserver/Server/AuthSocket.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp14
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp1
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h3
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.h2
-rw-r--r--src/server/game/Entities/Player/Player.cpp5
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp37
-rwxr-xr-xsrc/server/game/Handlers/SkillHandler.cpp4
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp1
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h1
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.cpp6
-rw-r--r--src/server/game/World/World.cpp5
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp4
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp47
14 files changed, 120 insertions, 12 deletions
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index d55d2cf02b3..e9090d517e2 100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -409,7 +409,7 @@ bool AuthSocket::_HandleLogonChallenge()
PreparedQueryResult banresult = LoginDatabase.Query(stmt);
if (banresult)
{
- if ((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64())
+ if ((*banresult)[0].GetUInt32() == (*banresult)[1].GetUInt32())
{
pkt << uint8(WOW_FAIL_BANNED);
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 69ecb1ef581..dbc6f6bae1a 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1951,6 +1951,20 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
delete targets;
break;
}
+ case SMART_ACTION_SET_HOME_POS:
+ {
+ if (!me)
+ break;
+
+ if (e.GetTargetType() == SMART_TARGET_SELF)
+ me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
+ else if (e.GetTargetType() == SMART_TARGET_POSITION)
+ me->SetHomePosition(e.target.x, e.target.y, e.target.z, e.target.o);
+ else
+ sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SET_HOME_POS is not using SMART_TARGET_SELF or SMART_TARGET_POSITION, skipping");
+
+ break;
+ }
default:
sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
break;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 37fd91fcc1b..b391df283ab 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -904,6 +904,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SEND_GOSSIP_MENU:
case SMART_ACTION_GO_SET_LOOT_STATE:
case SMART_ACTION_SEND_TARGET_TO_TARGET:
+ case SMART_ACTION_SET_HOME_POS:
break;
default:
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index b0a3c5b6bb6..e1dc67ab897 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -485,8 +485,9 @@ enum SMART_ACTION
SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId
SMART_ACTION_GO_SET_LOOT_STATE = 99, // state
SMART_ACTION_SEND_TARGET_TO_TARGET = 100, // id
+ SMART_ACTION_SET_HOME_POS = 101, // none
- SMART_ACTION_END = 101,
+ SMART_ACTION_END = 102,
};
struct SmartAction
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index f21818deb64..e341b21706f 100755
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -29,7 +29,7 @@ class Player;
enum LFGenum
{
- LFG_TIME_ROLECHECK = 2*MINUTE,
+ LFG_TIME_ROLECHECK = 40*IN_MILLISECONDS,
LFG_TIME_BOOT = 2*MINUTE,
LFG_TIME_PROPOSAL = 2*MINUTE,
LFG_TANKS_NEEDED = 1,
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 0579c9a4c36..bb38574bd41 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14733,13 +14733,14 @@ bool Player::CanSeeStartQuest(Quest const* quest)
bool Player::CanTakeQuest(Quest const* quest, bool msg)
{
- return SatisfyQuestStatus(quest, msg) && SatisfyQuestExclusiveGroup(quest, msg)
+ return !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this)
+ && SatisfyQuestStatus(quest, msg) && SatisfyQuestExclusiveGroup(quest, msg)
&& SatisfyQuestClass(quest, msg) && SatisfyQuestRace(quest, msg) && SatisfyQuestLevel(quest, msg)
&& SatisfyQuestSkill(quest, msg) && SatisfyQuestReputation(quest, msg)
&& SatisfyQuestPreviousQuest(quest, msg) && SatisfyQuestTimed(quest, msg)
&& SatisfyQuestNextChain(quest, msg) && SatisfyQuestPrevChain(quest, msg)
&& SatisfyQuestDay(quest, msg) && SatisfyQuestWeek(quest, msg)
- && SatisfyQuestSeasonal(quest,msg) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this)
+ && SatisfyQuestSeasonal(quest,msg)
&& SatisfyQuestConditions(quest, msg);
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 05fdde21b67..356a1e57bec 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4171,11 +4171,16 @@ uint32 Unit::GetDoTsByCaster(uint64 casterGUID) const
int32 Unit::GetTotalAuraModifier(AuraType auratype) const
{
+ std::map<SpellGroup, int32> SameEffectSpellGroup;
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- modifier += (*i)->GetAmount();
+ if (!sSpellMgr->AddSameEffectStackRuleSpellGroups((*i)->GetSpellInfo(), (*i)->GetAmount(), SameEffectSpellGroup))
+ modifier += (*i)->GetAmount();
+
+ for (std::map<SpellGroup, int32>::const_iterator itr = SameEffectSpellGroup.begin(); itr != SameEffectSpellGroup.end(); ++itr)
+ modifier += itr->second;
return modifier;
}
@@ -4219,14 +4224,19 @@ int32 Unit::GetMaxNegativeAuraModifier(AuraType auratype) const
int32 Unit::GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const
{
+ std::map<SpellGroup, int32> SameEffectSpellGroup;
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
+
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- {
- if ((*i)->GetMiscValue()& misc_mask)
- modifier += (*i)->GetAmount();
- }
+ if ((*i)->GetMiscValue() & misc_mask)
+ if (!sSpellMgr->AddSameEffectStackRuleSpellGroups((*i)->GetSpellInfo(), (*i)->GetAmount(), SameEffectSpellGroup))
+ modifier += (*i)->GetAmount();
+
+ for (std::map<SpellGroup, int32>::const_iterator itr = SameEffectSpellGroup.begin(); itr != SameEffectSpellGroup.end(); ++itr)
+ modifier += itr->second;
+
return modifier;
}
@@ -6442,6 +6452,23 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
switch (dummySpell->Id)
{
+ // Sacred Shield
+ case 53601:
+ {
+ if (procFlag & PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS)
+ return false;
+
+ if (damage > 0)
+ triggered_spell_id = 58597;
+
+ // Item - Paladin T8 Holy 4P Bonus
+ if (Unit* caster = triggeredByAura->GetCaster())
+ if (AuraEffect const* aurEff = caster->GetAuraEffect(64895, 0))
+ cooldown = aurEff->GetAmount();
+
+ target = this;
+ break;
+ }
if (!victim)
return false;
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index f2199e26055..9d93c7af182 100755
--- a/src/server/game/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
@@ -108,5 +108,9 @@ void WorldSession::HandleUnlearnSkillOpcode(WorldPacket& recvData)
{
uint32 skillId;
recvData >> skillId;
+
+ if (!IsPrimaryProfessionSkill(skillId))
+ return;
+
GetPlayer()->SetSkill(skillId, 0, 0, 0);
}
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index 164b65c067d..0edf0c0e80d 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -167,6 +167,7 @@ void MoveSpline::Initialize(const MoveSplineInitArgs& args)
point_Idx_offset = args.path_Idx_offset;
initialOrientation = args.initialOrientation;
+ onTransport = false;
time_passed = 0;
vertical_acceleration = 0.f;
effect_start_time = 0;
diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h
index 56f2670a04b..dc6dc860c8e 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -120,6 +120,7 @@ namespace Movement
const Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx+1) : Vector3(); }
int32 currentPathIdx() const;
+ bool onTransport;
std::string ToString() const;
};
}
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp
index d797ae69cf1..973c1a918a6 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.cpp
+++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp
@@ -69,10 +69,11 @@ namespace Movement
real_position.z = unit.GetTransOffsetZ();
real_position.orientation = unit.GetTransOffsetO();
}
+
// there is a big chance that current position is unknown if current state is not finalized, need compute it
// this also allows calculate spline position and update map position in much greater intervals
- // Don't compute for transport movement. The unit could be in a motion between two transports, thus having transport moveflag but is resulting in regular positions
- else if (!move_spline.Finalized())
+ // Don't compute for transport movement if the unit is in a motion between two transports
+ if (!move_spline.Finalized() && move_spline.onTransport == transport)
real_position = move_spline.ComputePosition();
// should i do the things that user should do? - no.
@@ -82,6 +83,7 @@ namespace Movement
// correct first vertex
args.path[0] = real_position;
args.initialOrientation = real_position.orientation;
+ move_spline.onTransport = transport;
uint32 moveFlags = unit.m_movementInfo.GetMovementFlags();
if (args.flags.walkmode)
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 1b3c44375d9..92dd103f79d 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1193,6 +1193,11 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_AUTOBROADCAST] = ConfigMgr::GetBoolDefault("AutoBroadcast.On", false);
m_int_configs[CONFIG_AUTOBROADCAST_CENTER] = ConfigMgr::GetIntDefault("AutoBroadcast.Center", 0);
m_int_configs[CONFIG_AUTOBROADCAST_INTERVAL] = ConfigMgr::GetIntDefault("AutoBroadcast.Timer", 60000);
+ if (reload)
+ {
+ m_timers[WUPDATE_AUTOBROADCAST].SetInterval(m_int_configs[CONFIG_AUTOBROADCAST_INTERVAL]);
+ m_timers[WUPDATE_AUTOBROADCAST].Reset();
+ }
// MySQL ping time interval
m_int_configs[CONFIG_DB_PING_INTERVAL] = ConfigMgr::GetIntDefault("MaxPingTime", 30);
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 10f7150351e..ea51f07dbe3 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -329,6 +329,8 @@ public:
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
+
+ void UpdateAI(uint32 const diff) {}
};
};
@@ -438,6 +440,8 @@ public:
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
+
+ void UpdateAI(uint32 const diff) {}
};
};
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index e0131190916..a48661d4aed 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -41,6 +41,10 @@ enum WarlockSpells
WARLOCK_HAUNT_HEAL = 48210,
WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117,
WARLOCK_CURSE_OF_DOOM_EFFECT = 18662,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_R1 = 18703,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_R2 = 18704,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1 = 60955,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956,
};
class spell_warl_banish : public SpellScriptLoader
@@ -671,6 +675,48 @@ class spell_warl_curse_of_doom : public SpellScriptLoader
}
};
+class spell_warl_health_funnel : public SpellScriptLoader
+{
+public:
+ spell_warl_health_funnel() : SpellScriptLoader("spell_warl_health_funnel") { }
+
+ class spell_warl_health_funnel_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_warl_health_funnel_AuraScript)
+
+ void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* caster = GetCaster();
+ if (!caster)
+ return;
+
+ Unit* target = GetTarget();
+ if (caster->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R2))
+ target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2, true);
+ else if (caster->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R1))
+ target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1, true);
+ }
+
+ void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1);
+ target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2);
+ }
+
+ void Register()
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_warl_health_funnel_AuraScript::RemoveEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
+ OnEffectApply += AuraEffectApplyFn(spell_warl_health_funnel_AuraScript::ApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_warl_health_funnel_AuraScript();
+ }
+};
+
void AddSC_warlock_spell_scripts()
{
new spell_warl_banish();
@@ -686,4 +732,5 @@ void AddSC_warlock_spell_scripts()
new spell_warl_haunt();
new spell_warl_unstable_affliction();
new spell_warl_curse_of_doom();
+ new spell_warl_health_funnel();
}