mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 23:38:54 -04:00
Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Handlers/SkillHandler.cpp
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `characters` MODIFY `name`
|
||||
VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE `creature_template` SET `unit_flags2`=`unit_flags2`|0x800; -- UNIT_FLAG2_REGENERATE_POWER
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM spell_script_names WHERE spell_id = -755;
|
||||
INSERT IGNORE INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(-755, 'spell_warl_health_funnel');
|
||||
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10304,10313);
|
||||
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
|
||||
(10304,5,62320,0,''),
|
||||
(10304,12,0,0,''),
|
||||
(10313,5,62320,0,''),
|
||||
(10313,12,1,0,'');
|
||||
@@ -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 ());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -108,5 +108,9 @@ void WorldSession::HandleUnlearnSkillOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint32 skillId;
|
||||
recvData >> skillId;
|
||||
|
||||
if (!IsPrimaryProfessionSkill(skillId))
|
||||
return;
|
||||
|
||||
GetPlayer()->SetSkill(skillId, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
+4
@@ -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) {}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user