Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-06-14 21:33:35 +08:00
138 changed files with 3510 additions and 1281 deletions
@@ -657,7 +657,7 @@ Appender.Console=1,4,0,"1 9 3 6 5 8"
Appender.Server=2,5,0,Server.log,w
Appender.Playerbots=2,5,0,Playerbots.log,w
# Appender.GM=2,5,15,gm_%s.log
Appender.Errors=2,5,0,Errors.log
Appender.Errors=2,5,0,Errors.log,w
# Appender.DB=3,5,0
# Logger config values: Given a logger "name"
+1 -1
View File
@@ -31,7 +31,7 @@
int32 PetAI::Permissible(Creature const* creature)
{
if (creature->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
if (creature->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
{
if (reinterpret_cast<Guardian const*>(creature)->GetOwner()->IsPlayer())
return PERMIT_BASE_PROACTIVE;
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Npc_EscortAI
SD%Complete: 100
SDComment:
SDCategory: Npc
EndScriptData */
#include "ScriptedEscortAI.h"
#include "Group.h"
#include "Player.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: FollowerAI
SD%Complete: 50
SDComment: This AI is under development
SDCategory: Npc
EndScriptData */
#include "ScriptedFollowerAI.h"
#include "Group.h"
#include "Player.h"
@@ -742,13 +742,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.action.cast.castFlags & SMARTCAST_COMBAT_MOVE)
{
// If cast flag SMARTCAST_COMBAT_MOVE is set combat movement will not be allowed unless target is outside spell range, out of mana, or LOS.
if (result == SPELL_FAILED_OUT_OF_RANGE)
// if we are just out of range, we only chase until we are back in spell range.
CAST_AI(SmartAI, me->AI())->SetCombatMove(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
else
// if spell fail for any other reason, we chase to melee range, or stay where we are if spellcast was successful.
CAST_AI(SmartAI, me->AI())->SetCombatMove(spellCastFailed);
if (!me->isMoving()) // Don't try to reposition while we are moving
{
// If cast flag SMARTCAST_COMBAT_MOVE is set combat movement will not be allowed unless target is outside spell range, out of mana, or LOS.
if (result == SPELL_FAILED_OUT_OF_RANGE)
// if we are just out of range, we only chase until we are back in spell range.
CAST_AI(SmartAI, me->AI())->SetCombatMove(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
else
// if spell fail for any other reason, we chase to melee range, or stay where we are if spellcast was successful.
CAST_AI(SmartAI, me->AI())->SetCombatMove(spellCastFailed);
}
}
if (spellCastFailed)
+2 -2
View File
@@ -1230,8 +1230,8 @@ void Channel::ToggleModeration(Player* player)
return;
}
const uint32 level = sWorld->getIntConfig(CONFIG_GM_LEVEL_CHANNEL_MODERATION);
const bool gm = (level && player->GetSession()->GetSecurity() >= level);
const AccountTypes level = static_cast<AccountTypes>(sWorld->getIntConfig(CONFIG_GM_LEVEL_CHANNEL_MODERATION));
const bool gm = (player->GetSession()->GetSecurity() >= level);
if (!playersStore[guid].IsModerator() && !gm)
{
@@ -422,6 +422,8 @@ namespace lfg
lockData = LFG_LOCKSTATUS_TOO_HIGH_LEVEL;
else if (dungeon->seasonal && !IsSeasonActive(dungeon->id))
lockData = LFG_LOCKSTATUS_NOT_IN_SEASON;
else if (player->IsClass(CLASS_DEATH_KNIGHT) && !player->IsGameMaster() &&!(player->IsQuestRewarded(13188) || player->IsQuestRewarded(13189)))
lockData = LFG_LOCKSTATUS_QUEST_NOT_COMPLETED;
else if (ar)
{
// Check required items
@@ -2591,7 +2591,7 @@ bool Creature::_IsTargetAcceptable(Unit const* target) const
void Creature::UpdateMoveInLineOfSightState()
{
// xinef: pets, guardians and units with scripts / smartAI should be skipped
if (IsPet() || HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN) ||
if (IsPet() || HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN) ||
GetScriptId() || GetAIName() == "SmartAI")
{
m_moveInLineOfSightStrictlyDisabled = false;
@@ -3735,7 +3735,7 @@ uint8 Creature::GetLeashTimer() const
{ // Based on testing on Classic, seems to range from ~11s for low level mobs (1-5) to ~16s for high level mobs (70+)
uint8 timerOffset = 11;
uint8 timerModifier = uint8(GetLevel() / 10) - 2;
uint8 timerModifier = uint8(GetCreatureTemplate()->minlevel / 10) - 2;
// Formula is likely not quite correct, but better than flat timer
return std::max<uint8>(timerOffset, timerOffset + timerModifier);
@@ -422,7 +422,7 @@ Guardian::Guardian(SummonPropertiesEntry const* properties, ObjectGuid owner, bo
m_unitTypeMask |= UNIT_MASK_GUARDIAN;
if (properties && (properties->Type == SUMMON_TYPE_PET || properties->Category == SUMMON_CATEGORY_PET))
{
m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN;
m_unitTypeMask |= UNIT_MASK_CONTROLLABLE_GUARDIAN;
InitCharmInfo();
}
}
@@ -435,7 +435,7 @@ void Guardian::InitStats(uint32 duration)
{
InitStatsForLevel(m_owner->GetLevel());
if (m_owner->IsPlayer() && HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
if (m_owner->IsPlayer() && HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
m_charmInfo->InitCharmCreateSpells();
}
+2 -2
View File
@@ -60,9 +60,9 @@ Pet::Pet(Player* owner, PetType type) : Guardian(nullptr, owner ? owner->GetGUID
if (type == HUNTER_PET)
m_unitTypeMask |= UNIT_MASK_HUNTER_PET;
if (!(m_unitTypeMask & UNIT_MASK_CONTROLABLE_GUARDIAN))
if (!(m_unitTypeMask & UNIT_MASK_CONTROLLABLE_GUARDIAN))
{
m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN;
m_unitTypeMask |= UNIT_MASK_CONTROLLABLE_GUARDIAN;
InitCharmInfo();
}
+1 -3
View File
@@ -393,7 +393,6 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
m_achievementMgr = new AchievementMgr(this);
m_reputationMgr = new ReputationMgr(this);
// Ours
m_NeedToSaveGlyphs = false;
m_MountBlockId = 0;
m_realDodge = 0.0f;
@@ -7188,8 +7187,7 @@ void Player::ApplyEquipSpell(SpellInfo const* spellInfo, Item* item, bool apply,
LOG_DEBUG("entities.player", "WORLD: cast {} Equip spellId - {}", (item ? "item" : "itemset"), spellInfo->Id);
//Ignore spellInfo->DurationEntry, cast with -1 duration
CastCustomSpell(spellInfo->Id, SPELLVALUE_AURA_DURATION, -1, this, true, item);
CastSpell(this, spellInfo, true, item);
}
else
{
-1
View File
@@ -2570,7 +2570,6 @@ public:
[[nodiscard]] bool CanFly() const override { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
[[nodiscard]] bool CanEnterWater() const override { return true; }
// OURS
// saving
void AdditionalSavingAddMask(uint8 mask) { m_additionalSaveTimer = 2000; m_additionalSaveMask |= mask; }
// arena spectator
+30 -16
View File
@@ -424,7 +424,7 @@ void Unit::Update(uint32 p_time)
SendThreatListUpdate();
// update combat timer only for players and pets (only pets with PetAI)
if (IsInCombat() && (IsPlayer() || ((IsPet() || HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN)) && IsControlledByPlayer())))
if (IsInCombat() && (IsPlayer() || ((IsPet() || HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN)) && IsControlledByPlayer())))
{
// Check UNIT_STATE_MELEE_ATTACKING or UNIT_STATE_CHASE (without UNIT_STATE_FOLLOW in this case) so pets can reach far away
// targets without stopping half way there and running off.
@@ -10793,7 +10793,7 @@ void Unit::SetMinion(Minion* minion, bool apply)
}
}
if (minion->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
if (minion->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
{
AddGuidValue(UNIT_FIELD_SUMMON, minion->GetGUID());
}
@@ -10888,7 +10888,7 @@ void Unit::SetMinion(Minion* minion, bool apply)
}
ASSERT((*itr)->IsCreature());
if (!(*itr)->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
if (!(*itr)->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
continue;
if (AddGuidValue(UNIT_FIELD_SUMMON, (*itr)->GetGUID()))
@@ -11703,7 +11703,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
int32 DoneTotal = 0;
float DoneTotalMod = TotalMod ? TotalMod : SpellPctDamageModsDone(victim, spellProto, damagetype);
// Config : RATE_CREATURE_X_SPELLDAMAGE & Do Not Modify Pet/Guardian/Mind Controled Damage
// Config : RATE_CREATURE_X_SPELLDAMAGE & Do Not Modify Pet/Guardian/Mind Controlled Damage
if (IsCreature() && (!ToCreature()->IsPet() || !ToCreature()->IsGuardian() || !ToCreature()->IsControlledByPlayer()))
DoneTotalMod *= ToCreature()->GetSpellDamageMod(ToCreature()->GetCreatureTemplate()->rank);
@@ -13520,7 +13520,7 @@ float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, SpellInfo const* spe
if (Player* modOwner = GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_PROC_PER_MINUTE, PPM);
return std::floor((WeaponSpeed * PPM) / 600.0f); // result is chance in percents (probability = Speed_in_sec * (PPM / 60))
return (WeaponSpeed * PPM) / 600.0f; // result is chance in percents (probability = Speed_in_sec * (PPM / 60))
}
void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
@@ -14698,7 +14698,7 @@ bool Unit::CanHaveThreatList(bool skipAliveCheck) const
return false;
// summons can not have a threat list, unless they are controlled by a creature
if (HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN) && ((Pet*)this)->GetOwnerGUID().IsPlayer())
if (HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN) && ((Pet*)this)->GetOwnerGUID().IsPlayer())
return false;
return true;
@@ -14854,7 +14854,7 @@ Unit* Creature::SelectVictim()
// it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list
// Note: creature does not have targeted movement generator but has attacker in this case
for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
if ((*itr) && CanCreatureAttack(*itr) && !(*itr)->IsPlayer() && !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
if ((*itr) && CanCreatureAttack(*itr) && !(*itr)->IsPlayer() && !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
return nullptr;
if (GetVehicle())
@@ -17572,16 +17572,30 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, WeaponAttackTyp
// If PPM exist calculate chance from PPM
if (spellProcEvent && spellProcEvent->ppmRate != 0)
{
uint32 attackSpeed = 0;
Unit* attacker = nullptr;
if (!isVictim)
{
uint32 WeaponSpeed = GetAttackTime(attType);
chance = GetPPMProcChance(WeaponSpeed, spellProcEvent->ppmRate, spellProto);
}
attacker = this;
else if (victim)
attacker = victim;
if (attacker)
{
uint32 WeaponSpeed = victim->GetAttackTime(attType);
chance = victim->GetPPMProcChance(WeaponSpeed, spellProcEvent->ppmRate, spellProto);
if (!procSpell || procSpell->DmgClass == SPELL_DAMAGE_CLASS_MELEE || procSpell->IsRangedWeaponSpell())
{
attackSpeed = attacker->GetAttackTime(attType);
}
else //spells user their casttime for ppm calculations
{
if (procSpell->CastTimeEntry)
attackSpeed = procSpell->CastTimeEntry->CastTime;
//instants and fast spells use 1.5s castspeed
if (attackSpeed < 1500)
attackSpeed = 1500;
}
}
chance = GetPPMProcChance(attackSpeed, spellProcEvent->ppmRate, spellProto);
}
// Custom chances
@@ -20011,11 +20025,11 @@ void Unit::StopAttackingInvalidTarget()
attacker->ToPlayer()->SendAttackSwingCancelAttack();
}
for (Unit* controled : attacker->m_Controlled)
for (Unit* controlled : attacker->m_Controlled)
{
if (controled->GetVictim() == this && !controled->IsValidAttackTarget(this))
if (controlled->GetVictim() == this && !controlled->IsValidAttackTarget(this))
{
controled->AttackStop();
controlled->AttackStop();
}
}
+1 -1
View File
@@ -743,7 +743,7 @@ public:
// Unit type methods
[[nodiscard]] bool IsSummon() const { return m_unitTypeMask & UNIT_MASK_SUMMON; }
[[nodiscard]] bool IsGuardian() const { return m_unitTypeMask & UNIT_MASK_GUARDIAN; }
[[nodiscard]] bool IsControllableGuardian() const { return m_unitTypeMask & UNIT_MASK_CONTROLABLE_GUARDIAN; }
[[nodiscard]] bool IsControllableGuardian() const { return m_unitTypeMask & UNIT_MASK_CONTROLLABLE_GUARDIAN; }
[[nodiscard]] bool IsPet() const { return m_unitTypeMask & UNIT_MASK_PET; }
[[nodiscard]] bool IsHunterPet() const { return m_unitTypeMask & UNIT_MASK_HUNTER_PET; }
[[nodiscard]] bool IsTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; }
+1 -1
View File
@@ -161,7 +161,7 @@ enum UnitTypeMask
UNIT_MASK_VEHICLE = 0x00000020,
UNIT_MASK_PUPPET = 0x00000040,
UNIT_MASK_HUNTER_PET = 0x00000080,
UNIT_MASK_CONTROLABLE_GUARDIAN = 0x00000100,
UNIT_MASK_CONTROLLABLE_GUARDIAN = 0x00000100,
UNIT_MASK_ACCESSORY = 0x00000200
};
+1 -1
View File
@@ -1473,7 +1473,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
if (pInvitee->GetSocial()->HasIgnore(player->GetGUID()))
return;
uint32 memberLimit = sConfigMgr->GetOption<uint32>("Guild.MemberLimit", 0);
uint32 memberLimit = sWorld->getIntConfig(CONFIG_GUILD_MEMBER_LIMIT);
if (memberLimit > 0 && player->GetGuild()->GetMemberCount() >= memberLimit)
{
ChatHandler(player->GetSession()).PSendSysMessage("Your guild has reached the maximum amount of members ({}). You cannot send another invite until the guild member count is lower.", memberLimit);
+1 -1
View File
@@ -701,7 +701,7 @@ public:
void HandleSetEmblem(EmblemInfo const& emblemInfo);
void HandleSetLeader(WorldSession* session, std::string_view name);
void HandleSetBankTabInfo(WorldSession* session, uint8 tabId, std::string_view name, std::string_view icon);
void HandleSetMemberNote(WorldSession* session, std::string_view name, std::string_view note, bool officer);
void HandleSetMemberNote(WorldSession* session, std::string_view name, std::string_view note, bool isPublic);
void HandleSetRankInfo(WorldSession* session, uint8 rankId, std::string_view name, uint32 rights, uint32 moneyPerDay, std::array<GuildBankRightsAndSlots, GUILD_BANK_MAX_TABS> const& rightsAndSlots);
void HandleSetRankInfo(uint8 rankId, uint32 rights = 0, std::string_view name = "", uint32 moneyPerDay = 0);
void HandleBuyBankTab(WorldSession* session, uint8 tabId);
+1 -1
View File
@@ -300,7 +300,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
pet->setDeathState(DeathState::Corpse);
}
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN))
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN))
{
pet->ToTempSummon()->UnSummon();
}
@@ -58,11 +58,7 @@ uint32 ScriptMgr::DealDamage(Unit* AttackerUnit, Unit* pVictim, uint32 damage, D
for (auto const& [scriptID, script] : ScriptRegistry<UnitScript>::ScriptPointerList)
{
auto const& dmg = script->DealDamage(AttackerUnit, pVictim, damage, damagetype);
if (dmg != damage)
{
return damage;
}
damage = script->DealDamage(AttackerUnit, pVictim, damage, damagetype);
}
return damage;
@@ -6852,8 +6852,10 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
heal = uint32(caster->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT, GetBase()->GetStackAmount()));
HealInfo healInfo(caster, caster, heal, GetSpellInfo(), GetSpellInfo()->GetSchoolMask());
int32 gain = caster->HealBySpell(healInfo);
caster->getHostileRefMgr().threatAssist(caster, gain * 0.5f, GetSpellInfo());
float threat = float(caster->HealBySpell(healInfo)) * 0.5f;
if (caster->IsClass(CLASS_PALADIN))
threat *= 0.5f;
caster->getHostileRefMgr().threatAssist(caster, threat, GetSpellInfo());
}
void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster) const
@@ -7000,7 +7002,13 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
target->SendPeriodicAuraLog(&pInfo);
if (caster)
target->getHostileRefMgr().threatAssist(caster, float(gain) * 0.5f, GetSpellInfo());
{
float threat = float(gain) * 0.5f;
if (caster->IsClass(CLASS_PALADIN))
threat *= 0.5f;
target->getHostileRefMgr().threatAssist(caster, threat, GetSpellInfo());
}
bool haveCastItem = GetBase()->GetCastItemGUID();
+6 -2
View File
@@ -2808,7 +2808,11 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
}
int32 gain = caster->HealBySpell(healInfo, crit);
unitTarget->getHostileRefMgr().threatAssist(caster, float(gain) * 0.5f, m_spellInfo);
float threat = float(gain) * 0.5f;
if (caster->IsClass(CLASS_PALADIN))
threat *= 0.5f;
unitTarget->getHostileRefMgr().threatAssist(caster, threat, m_spellInfo);
m_healing = gain;
// Xinef: if heal acutally healed something, add no overheal flag
@@ -3451,7 +3455,7 @@ bool Spell::UpdateChanneledTargetList()
continue;
}
// Xinef: Update Orientation server side (non players wont sent appropriate packets)
else if (m_spellInfo->HasAttribute(SPELL_ATTR1_TRACK_TARGET_IN_CHANNEL))
else if (!m_caster->IsPlayer() && m_spellInfo->HasAttribute(SPELL_ATTR1_TRACK_TARGET_IN_CHANNEL))
m_caster->UpdateOrientation(m_caster->GetAngle(unit));
}
}
+18 -33
View File
@@ -3428,11 +3428,6 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
spell_bonus += int32(0.08f * m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
spell_bonus += int32(0.13f * m_caster->SpellBaseDamageBonusDone(m_spellInfo->GetSchoolMask()));
break;
case 42463: // Seals of the Pure for Seal of Vengeance/Corruption
case 53739:
if (AuraEffect const* sealsOfPure = m_caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_PALADIN, 25, 0))
AddPct(totalDamagePercentMod, sealsOfPure->GetAmount());
break;
case 53385: // Divine Storm deals normalized damage
normalized = true;
break;
@@ -3532,9 +3527,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
// Blood-Caked Strike - Blood-Caked Blade
if (m_spellInfo->SpellIconID == 1736)
{
int32 weaponDamage = m_caster->CalculateDamage(m_attackType, false, true);
ApplyPct(weaponDamage, std::min(uint32(3), unitTarget->GetDiseasesByCaster(m_caster->GetGUID())) * 12.5f);
spell_bonus = weaponDamage;
AddPct(totalDamagePercentMod, unitTarget->GetDiseasesByCaster(m_caster->GetGUID()) * 50.0f);
break;
}
// Heart Strike
@@ -3581,30 +3574,26 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
}
}
// apply to non-weapon bonus weapon total pct effect, weapon total flat effect included in weapon damage
if (fixed_bonus || spell_bonus)
bool const isPhysical = (m_spellSchoolMask & SPELL_SCHOOL_MASK_NORMAL);
if (isPhysical && (fixed_bonus || spell_bonus))
{
UnitMods unitMod;
switch (m_attackType)
{
default:
case BASE_ATTACK:
unitMod = UNIT_MOD_DAMAGE_MAINHAND;
break;
case OFF_ATTACK:
unitMod = UNIT_MOD_DAMAGE_OFFHAND;
break;
case RANGED_ATTACK:
unitMod = UNIT_MOD_DAMAGE_RANGED;
break;
}
if (m_spellSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
{
float weapon_total_pct = m_caster->GetModifierValue(unitMod, TOTAL_PCT);
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
spell_bonus = int32(spell_bonus * weapon_total_pct);
default:
case BASE_ATTACK:
unitMod = UNIT_MOD_DAMAGE_MAINHAND;
break;
case OFF_ATTACK:
unitMod = UNIT_MOD_DAMAGE_OFFHAND;
break;
case RANGED_ATTACK:
unitMod = UNIT_MOD_DAMAGE_RANGED;
break;
}
float weapon_total_pct = m_caster->GetModifierValue(unitMod, TOTAL_PCT);
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
spell_bonus = int32(spell_bonus * weapon_total_pct);
}
int32 weaponDamage = 0;
@@ -3612,15 +3601,11 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
if (m_caster->GetEntry() == 27893)
{
if (Unit* owner = m_caster->GetOwner())
weaponDamage = owner->CalculateDamage(m_attackType, normalized, true);
}
else if (m_spellInfo->Id == 5019) // Wands
{
weaponDamage = m_caster->CalculateDamage(m_attackType, true, false);
weaponDamage = owner->CalculateDamage(m_attackType, normalized, isPhysical);
}
else
{
weaponDamage = m_caster->CalculateDamage(m_attackType, normalized, true);
weaponDamage = m_caster->CalculateDamage(m_attackType, normalized, isPhysical);
}
// Sequence is important
+1 -11
View File
@@ -2126,6 +2126,7 @@ AuraStateType SpellInfo::LoadAuraState() const
case 20656:
case 25602:
case 32129:
case 49163: // Perpetual Instability (Element 115)
return AURA_STATE_FAERIE_FIRE;
default:
break;
@@ -2644,14 +2645,6 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
switch (Effects[effIndex].Effect)
{
case SPELL_EFFECT_DUMMY:
// some explicitly required dummy effect sets
switch (Id)
{
default:
break;
}
break;
// always positive effects (check before target checks that provided non-positive result in some case for positive effects)
case SPELL_EFFECT_HEAL:
case SPELL_EFFECT_LEARN_SPELL:
@@ -2661,10 +2654,8 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
return true;
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
return false;
case SPELL_EFFECT_GAMEOBJECT_DAMAGE:
return false;
case SPELL_EFFECT_SCHOOL_DAMAGE:
{
bool only = true;
@@ -2688,7 +2679,6 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
return false;
break;
}
// non-positive aura use
case SPELL_EFFECT_APPLY_AURA:
case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND:
@@ -230,15 +230,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->MaxAffectedTargets = 4;
});
ApplySpellFix({
20424, // Seal of Command
42463, // Seal of Vengeance
53739 // Seal of Corruption
}, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx3 |= SPELL_ATTR3_IGNORE_CASTER_MODIFIERS;
});
// Spitfire Totem
ApplySpellFix({ 38296 }, [](SpellInfo* spellInfo)
{
@@ -3580,7 +3571,7 @@ void SpellMgr::LoadSpellInfoCorrections()
// That's Abominable
ApplySpellFix({ 59565 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MiscValueB = 1721; // controlable guardian
spellInfo->Effects[EFFECT_0].MiscValueB = 1721; // controllable guardian
});
// Investigate the Blue Recluse (1920)
@@ -5140,6 +5131,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->ChannelInterruptFlags &= ~AURA_INTERRUPT_FLAG_TURNING;
});
// The Green Tower
ApplySpellFix({ 18097 }, [](SpellInfo* spellInfo)
{
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(21); // -1
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];
+1
View File
@@ -412,6 +412,7 @@ enum WorldIntConfigs
CONFIG_GUILD_BANK_TAB_COST_3,
CONFIG_GUILD_BANK_TAB_COST_4,
CONFIG_GUILD_BANK_TAB_COST_5,
CONFIG_GUILD_MEMBER_LIMIT,
CONFIG_GM_LEVEL_CHANNEL_MODERATION,
CONFIG_TOGGLE_XP_COST,
CONFIG_NPC_EVADE_IF_NOT_REACHABLE,
+2
View File
@@ -845,6 +845,8 @@ void World::LoadConfigSettings(bool reload)
_int_configs[CONFIG_GUILD_BANK_TAB_COST_4] = sConfigMgr->GetOption<int32>("Guild.BankTabCost4", 25000000);
_int_configs[CONFIG_GUILD_BANK_TAB_COST_5] = sConfigMgr->GetOption<int32>("Guild.BankTabCost5", 50000000);
_int_configs[CONFIG_GUILD_MEMBER_LIMIT] = sConfigMgr->GetOption<uint32>("Guild.MemberLimit", 0);
_bool_configs[CONFIG_DETECT_POS_COLLISION] = sConfigMgr->GetOption<bool>("DetectPosCollision", true);
_bool_configs[CONFIG_RESTRICTED_LFG_CHANNEL] = sConfigMgr->GetOption<bool>("Channel.RestrictedLfg", true);
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: account_commandscript
%Complete: 100
Comment: All account related commands
Category: commandscripts
EndScriptData */
#include "AES.h"
#include "AccountMgr.h"
#include "Base32.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: achievement_commandscript
%Complete: 100
Comment: All achievement related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Player.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: arena_commandscript
%Complete: 100
Comment: All arena team related commands
Category: commandscripts
EndScriptData */
#include "ArenaTeamMgr.h"
#include "ArenaSeasonMgr.h"
#include "ArenaTeamFilter.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: ban_commandscript
%Complete: 100
Comment: All ban related commands
Category: commandscripts
EndScriptData */
#include "AccountMgr.h"
#include "BanMgr.h"
#include "CharacterCache.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: bf_commandscript
%Complete: 100
Comment: All bf related commands
Category: commandscripts
EndScriptData */
#include "BattlefieldMgr.h"
#include "Chat.h"
#include "CommandScript.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: cast_commandscript
%Complete: 100
Comment: All cast related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Creature.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: character_commandscript
%Complete: 100
Comment: All character related commands
Category: commandscripts
EndScriptData */
#include "AccountMgr.h"
#include "AchievementMgr.h"
#include "Chat.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: debug_commandscript
%Complete: 100
Comment: All debug related commands
Category: commandscripts
EndScriptData */
#include "Bag.h"
#include "BattlegroundMgr.h"
#include "CellImpl.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: disable_commandscript
%Complete: 100
Comment: All disable related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "DisableMgr.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: event_commandscript
%Complete: 100
Comment: All event related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "GameEventMgr.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: gm_commandscript
%Complete: 100
Comment: All gm related commands
Category: commandscripts
EndScriptData */
#include "AccountMgr.h"
#include "Chat.h"
#include "CommandScript.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: go_commandscript
%Complete: 100
Comment: All go related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "GameGraveyard.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: guild_commandscript
%Complete: 100
Comment: All guild related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Guild.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: honor_commandscript
%Complete: 100
Comment: All honor related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Language.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: instance_commandscript
%Complete: 100
Comment: All instance related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "GameTime.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: item_commandscript
%Complete: 0
Comment: All item related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "DBCStores.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: learn_commandscript
%Complete: 100
Comment: All learn related commands
Category: commandscripts
EndScriptData */
#include "CommandScript.h"
#include "Language.h"
#include "ObjectMgr.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: list_commandscript
%Complete: 100
Comment: All list related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Creature.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: lookup_commandscript
%Complete: 100
Comment: All lookup related commands
Category: commandscripts
EndScriptData */
#include "CharacterCache.h"
#include "Chat.h"
#include "CommandScript.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: message_commandscript
%Complete: 100
Comment: All message related commands
Category: commandscripts
EndScriptData */
#include "Channel.h"
#include "Chat.h"
#include "CommandScript.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: modify_commandscript
%Complete: 100
Comment: All modify related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "ObjectMgr.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: quest_commandscript
%Complete: 100
Comment: All quest related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "GameTime.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: reload_commandscript
%Complete: 100
Comment: All reload related commands
Category: commandscripts
EndScriptData */
#include "AchievementMgr.h"
#include "AuctionHouseMgr.h"
#include "AutobroadcastMgr.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: reset_commandscript
%Complete: 100
Comment: All reset related commands
Category: commandscripts
EndScriptData */
#include "AchievementMgr.h"
#include "Chat.h"
#include "CommandScript.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: server_commandscript
%Complete: 100
Comment: All server related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Common.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: tele_commandscript
%Complete: 100
Comment: All tele related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "DBCStores.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: ticket_commandscript
%Complete: 100
Comment: All ticket related commands
Category: commandscripts
EndScriptData */
#include "AccountMgr.h"
#include "Chat.h"
#include "CommandScript.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: titles_commandscript
%Complete: 100
Comment: All titles related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "DBCStores.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: worldstate_commandscript
%Complete: 100
Comment: All worldstate related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Common.h"
-7
View File
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: wp_commandscript
%Complete: 100
Comment: All wp related commands
Category: commandscripts
EndScriptData */
#include "Chat.h"
#include "CommandScript.h"
#include "Player.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Bosses_Opera
SD%Complete: 90
SDComment: Oz, Hood, and RAJ event implemented. RAJ event requires more testing.
SDCategory: Karazhan
EndScriptData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -131,7 +131,6 @@ public:
if (creature->AI()->GetData(DATA_IN_PROGRESS))
return true;
creature->SetImmuneToPC(false);
creature->RemoveUnitFlag(UNIT_FLAG_SWIMMING);
player->CastSpell(creature, SPELL_DUEL, false);
@@ -231,6 +230,7 @@ public:
me->RemoveAllAuras();
me->CastSpell(attacker, SPELL_DUEL_VICTORY, true);
me->RestoreFaction();
me->DespawnOrUnsummon(10000);
}
}
}
@@ -545,7 +545,6 @@ public:
};
};
// Theirs
/*######
##Quest 12848
######*/
@@ -1211,7 +1210,6 @@ class spell_lich_king_whisper : public SpellScript
void AddSC_the_scarlet_enclave_c1()
{
// Ours
RegisterSpellScript(spell_q12641_death_comes_from_on_high_summon_ghouls);
RegisterSpellScript(spell_q12641_death_comes_from_on_high_recall_eye);
new npc_death_knight_initiate();
@@ -1220,16 +1218,12 @@ void AddSC_the_scarlet_enclave_c1()
new npc_scarlet_ghoul();
new npc_dkc1_gothik();
new npc_scarlet_cannon();
// Theirs
new npc_unworthy_initiate();
new npc_unworthy_initiate_anchor();
new go_acherus_soul_prison();
new npc_scarlet_miner();
new npc_scarlet_miner_cart();
new go_inconspicuous_mine_car();
RegisterSpellScript(spell_death_knight_initiate_visual);
RegisterSpellScript(spell_lich_king_whisper);
RegisterSpellScript(spell_lich_king_vo_blocker);
@@ -209,52 +209,11 @@ struct npc_dark_fiend : public ScriptedAI
me->m_Events.AddEventAtOffset([this]() {
me->SetReactState(REACT_AGGRESSIVE);
Unit* target = nullptr;
if (InstanceScript* instance = me->GetInstanceScript())
{
if (Creature* muru = instance->GetCreature(DATA_MURU))
{
if (muru->IsAlive() && !muru->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
{
std::list<HostileReference*> const& threatList = muru->GetThreatMgr().GetThreatList();
std::vector<Unit*> validTargets;
for (HostileReference* ref : threatList)
{
if (Unit* unit = ObjectAccessor::GetUnit(*muru, ref->getUnitGuid()))
{
if (unit->IsPlayer() && unit->IsAlive() && unit->IsWithinDist(me, 50.0f))
validTargets.push_back(unit);
}
}
if (!validTargets.empty())
target = validTargets[urand(0, validTargets.size() - 1)];
}
else
{
if (Creature* entropius = me->FindNearestCreature(NPC_ENTROPIUS, 100.0f))
{
std::list<HostileReference*> const& threatList = entropius->GetThreatMgr().GetThreatList();
std::vector<Unit*> validTargets;
for (HostileReference* ref : threatList)
{
if (Unit* unit = ObjectAccessor::GetUnit(*entropius, ref->getUnitGuid()))
{
if (unit->IsPlayer() && unit->IsAlive() && unit->IsWithinDist(me, 50.0f))
{
validTargets.push_back(unit);
}
}
}
if (!validTargets.empty())
target = validTargets[urand(0, validTargets.size() - 1)];
}
}
}
}
target = muru->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, FarthestTargetSelector(me, 50.0f, true, true));
if (target)
{
@@ -15,15 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
TCName: Boss_Arlokk
TC%Complete: 95
TCComment: Wrong cleave and red aura is missing not yet added.
TCComment: Prowlers moving through wall hopefully mmaps will fix.
TCComment: Can't test LOS until mmaps.
TCCategory: Zul'Gurub
EndScriptData */
#include "CreatureScript.h"
#include "GameObjectScript.h"
#include "ScriptedCreature.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Boss_Grilek
SD%Complete: 100
SDComment:
SDCategory: Zul'Gurub
EndScriptData */
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "zulgurub.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Boss_Renataki
SD%Complete: 100
SDComment:
SDCategory: Zul'Gurub
EndScriptData */
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "zulgurub.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Boss_Wushoolay
SD%Complete: 100
SDComment:
SDCategory: Zul'Gurub
EndScriptData */
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "zulgurub.h"
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Instance_ZulGurub
SD%Complete: 80
SDComment: Missing reset function after killing a boss for Ohgan, Thekal.
SDCategory: Zul'Gurub
EndScriptData */
#include "GameEventMgr.h"
#include "GameObjectAI.h"
#include "GameObjectScript.h"
@@ -15,17 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Arathi Highlands
SD%Complete: 100
SDComment: Quest support: 665
SDCategory: Arathi Highlands
EndScriptData */
/* ContentData
npc_professor_phizzlethorpe
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,20 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Eastern_Plaguelands
SD%Complete: 100
SDComment: Quest support: 5211, 5742. Special vendor Augustus the Touched
SDCategory: Eastern Plaguelands
EndScriptData */
/* ContentData
npc_ghoul_flayer
npc_augustus_the_touched
npc_darrowshire_spirit
npc_tirion_fordring
EndContentData */
#include "CreatureScript.h"
#include "PassiveAI.h"
#include "Player.h"
@@ -36,8 +22,6 @@ EndContentData */
#include "ScriptedGossip.h"
#include "SpellInfo.h"
// Ours
enum eEris
{
QUEST_BALANCE_OF_LIGHT_AND_SHADOW = 7622,
@@ -312,7 +296,6 @@ public:
};
};
// Theirs
/*######
## npc_augustus_the_touched
######*/
@@ -345,10 +328,7 @@ public:
void AddSC_eastern_plaguelands()
{
// Ours
new npc_eris_hevenfire();
new npc_balance_of_light_and_shadow();
// Theirs
new npc_augustus_the_touched();
}
@@ -15,17 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Hinterlands
SD%Complete: 100
SDComment: Quest support: 2742
SDCategory: The Hinterlands
EndScriptData */
/* ContentData
npc_rinji
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Silverpine_Forest
SD%Complete: 100
SDComment: Quest support: 435, 452
SDCategory: Silverpine Forest
EndScriptData */
/* ContentData
npc_deathstalker_erland
pyrewood_ambush
EndContentData */
#include "CreatureScript.h"
#include "PassiveAI.h"
#include "Player.h"
@@ -15,21 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Stormwind_City
SD%Complete: 100
SDComment: Quest support: 1447, 4185, 11223, 434.
SDCategory: Stormwind City
EndScriptData */
/* ContentData
npc_archmage_malin
npc_tyrion
npc_tyrion_spybot
npc_marzon_silent_blade
npc_lord_gregor_lescovar
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -472,10 +457,32 @@ public:
}
};
enum KingVarianWrynn : uint32
{
// Deathknight Starting Zone End
QUEST_WHERE_KINGS_WALK = 13188,
};
class npc_king_varian_wrynn : public CreatureScript
{
public:
npc_king_varian_wrynn() : CreatureScript("npc_king_varian_wrynn") { }
bool OnQuestReward(Player* player, Creature* /*creature*/, Quest const* quest, uint32 /*item*/) override
{
if (quest->GetQuestId() == QUEST_WHERE_KINGS_WALK)
sLFGMgr->InitializeLockedDungeons(player);
return true;
}
};
void AddSC_stormwind_city()
{
new npc_tyrion();
new npc_tyrion_spybot();
new npc_lord_gregor_lescovar();
new npc_marzon_silent_blade();
new npc_king_varian_wrynn();
}
@@ -15,19 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Undercity
SD%Complete: 95
SDComment: Quest support: 6628, 9180(post-event).
SDCategory: Undercity
EndScriptData */
/* ContentData
npc_lady_sylvanas_windrunner
npc_highborne_lamenter
npc_parqual_fintallas
EndContentData */
#include "CreatureScript.h"
#include "ObjectAccessor.h"
#include "Player.h"
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Western_Plaguelands
SD%Complete: 90
SDComment: Quest support: 5097, 5098, 5216, 5219, 5222, 5225, 5229, 5231, 5233, 5235. To obtain Vitreous Focuser (could use more spesifics about gossip items)
SDCategory: Western Plaguelands
EndScriptData */
/* ContentData
npc_the_scourge_cauldron
npc_andorhal_tower
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
@@ -15,17 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Westfall
SD%Complete: 90
SDComment: Quest support: 155
SDCategory: Westfall
EndScriptData */
/* ContentData
npc_daphne_stilwell
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Wetlands
SD%Complete: 80
SDComment: Quest support: 1249
SDCategory: Wetlands
EndScriptData */
/* ContentData
npc_mikhail
npc_tapoke_slim_jahn
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -36,18 +36,6 @@
// see: https://github.com/azerothcore/azerothcore-wotlk/issues/9766
#include "GridNotifiersImpl.h"
/* ScriptData
SDName: Zulfarrak
SD%Complete: 50
SDComment: Consider it temporary, no instance script made for this instance yet.
SDCategory: Zul'Farrak
EndScriptData */
/* ContentData
npc_sergeant_bly
npc_weegli_blastfuse
EndContentData */
/*######
## npc_sergeant_bly
######*/
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Ashenvale
SD%Complete: 70
SDComment: Quest support: 6544, 6482
SDCategory: Ashenvale Forest
EndScriptData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Azshara
SD%Complete: 90
SDComment: Quest support: 2744, 3141, 9364, 10994
SDCategory: Azshara
EndScriptData */
/* ContentData
npc_rizzle_sprysprocket
npc_depth_charge
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,17 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Bloodmyst_Isle
SD%Complete: 80
SDComment: Quest support: 9670
SDCategory: Bloodmyst Isle
EndScriptData */
/* ContentData
npc_webbed_creature
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Darkshore
SD%Complete: 100
SDComment: Quest support: 731, 2078, 5321
SDCategory: Darkshore
EndScriptData */
/* ContentData
npc_kerlonian
npc_prospector_remtravel
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -35,7 +23,6 @@ EndContentData */
#include "ScriptedGossip.h"
#include "SpellInfo.h"
// Ours
enum murkdeep
{
NPC_GREYMIST_HUNTER = 2206,
@@ -159,7 +146,6 @@ public:
};
};
// Theirs
/*####
# npc_kerlonian
####*/
@@ -643,12 +629,9 @@ public:
void AddSC_darkshore()
{
// Ours
new npc_murkdeep();
new npc_rabid_thistle_bear();
new npc_tharnarian();
// Theirs
new npc_kerlonian();
new npc_prospector_remtravel();
}
@@ -15,17 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Desolace
SD%Complete: 100
SDComment: Quest support: 5561
SDCategory: Desolace
EndScriptData */
/* ContentData
npc_aged_dying_ancient_kodo
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -33,7 +22,6 @@ EndContentData */
#include "ScriptedGossip.h"
#include "SpellInfo.h"
// Ours
enum Caravan
{
QUEST_BODYGUARD_FOR_HIRE = 5821,
@@ -420,7 +408,6 @@ public:
};
};
// Theirs
enum DyingKodo
{
SAY_SMEED_HOME = 0,
@@ -512,9 +499,6 @@ public:
void AddSC_desolace()
{
// Ours
new npc_cork_gizelton();
// Theirs
new npc_aged_dying_ancient_kodo();
}
@@ -15,17 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Felwood
SD%Complete: 95
SDComment: Quest support: 4101, 4102
SDCategory: Felwood
EndScriptData */
/* ContentData
npcs_riverbreeze_and_silversky
EndContentData */
#include "AreaTriggerScript.h"
#include "CreatureScript.h"
#include "Player.h"
@@ -20,12 +20,6 @@
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
/* ScriptData
SDName: Feralas
SD%Complete: 100
SDComment: Quest support: 3520 Special vendor Gregan Brewspewer
SDCategory: Feralas
EndScriptData */
enum GordunniTrap
{
@@ -15,21 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Moonglade
SD%Complete: 100
SDComment: Quest support: 30, 272, 5929, 5930, 10965. Special Flight Paths for Druid class.
SDCategory: Moonglade
EndScriptData */
/* ContentData
npc_bunthen_plainswind
npc_great_bear_spirit
npc_silva_filnaveth
npc_clintar_spirit
npc_clintar_dreamwalker
EndContentData */
#include "Cell.h"
#include "CreatureScript.h"
#include "GridNotifiers.h"
+18 -21
View File
@@ -15,24 +15,13 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Orgrimmar
SD%Complete: 100
SDComment: Quest support: 2460, 6566
SDCategory: Orgrimmar
EndScriptData */
/* ContentData
npc_shenthul
npc_thrall_warchief
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "TaskScheduler.h"
#include "LFGMgr.h"
/*######
## npc_shenthul
@@ -152,9 +141,12 @@ enum ThrallWarchief : uint32
GO_UNADORNED_SPIKE = 175787,
// What the Wind Carries (ID: 6566)
QUEST_WHAT_THE_WIND_CARRIES = 6566,
GOSSIP_MENU_THRALL = 3664,
GOSSIP_RESPONSE_THRALL_FIRST = 5733,
QUEST_WHAT_THE_WIND_CARRIES = 6566,
GOSSIP_MENU_THRALL = 3664,
GOSSIP_RESPONSE_THRALL_FIRST = 5733,
// Deathknight Starting Zone End
QUEST_WARCHIEFS_BLESSING = 13189,
};
const Position heraldOfThrallPos = { -462.404f, -2637.68f, 96.0656f, 5.8606f };
@@ -204,14 +196,19 @@ public:
return true;
}
bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/) override
bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 /*item*/) override
{
if (quest->GetQuestId() == QUEST_FOR_THE_HORDE)
switch (quest->GetQuestId())
{
if (creature && creature->AI())
{
creature->AI()->DoAction(ACTION_START_TALKING);
}
case (QUEST_FOR_THE_HORDE):
if (creature && creature->AI())
creature->AI()->DoAction(ACTION_START_TALKING);
break;
case (QUEST_WARCHIEFS_BLESSING):
sLFGMgr->InitializeLockedDungeons(player);
break;
default:
break;
}
return true;
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Silithus
SD%Complete: 100
SDComment: Quest support: 8304, 8507.
SDCategory: Silithus
EndScriptData */
/* ContentData
npcs_rutgar_and_frankal
quest_a_pawn_on_the_eternal_pawn
EndContentData */
#include "AccountMgr.h"
#include "CreatureScript.h"
#include "GameObject.h"
@@ -98,16 +86,6 @@ enum EternalBoard
# Quest: A Pawn on the Eternal Board
#####*/
/* ContentData
A Pawn on the Eternal Board - creatures, gameobjects and defines
npc_qiraj_war_spawn : Adds that are summoned in the Qiraj gates battle.
npc_anachronos_the_ancient : Creature that controls the event.
npc_anachronos_quest_trigger: controls the spawning of the BG War mobs.
go_crystalline_tear : GameObject that begins the event and hands out quest
TO DO: get correct spell IDs and timings for spells cast upon dragon transformations
TO DO: Dragons should use the HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF) after transformation, but for some unknown reason it doesnt work.
EndContentData */
#define EVENT_AREA_RADIUS 65 //65yds
#define EVENT_COOLDOWN 500000 //in ms. appear after event completed or failed (should be = Adds despawn time)
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Stonetalon_Mountains
SD%Complete: 95
SDComment: Quest support: 6627, 6523
SDCategory: Stonetalon Mountains
EndScriptData */
/* ContentData
npc_braug_dimspirit
npc_kaya_flathoof
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,21 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Tanaris
SD%Complete: 80
SDComment: Quest support: 1560, 2954, 4005, 10277, 10279(Special flight path). Noggenfogger vendor
SDCategory: Tanaris
EndScriptData */
/* ContentData
npc_aquementas
npc_custodian_of_time
npc_steward_of_time
npc_stone_watcher_of_norgannon
npc_tooga
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,22 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: The_Barrens
SD%Complete: 90
SDComment: Quest support: 863, 898, 1719, 2458, 4921, 6981,
SDCategory: Barrens
EndScriptData */
/* ContentData
npc_beaten_corpse
npc_gilthares
npc_sputtervalve
npc_taskmaster_fizzule
npc_twiggy_flathead
npc_wizzlecrank_shredder
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
@@ -22,20 +22,6 @@
#include "ScriptedGossip.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
/* ScriptData
SDName: Thousand Needles
SD%Complete: 100
SDComment: Support for Quest: 1950, 4770, 4904, 4966, 5151.
SDCategory: Thousand Needles
EndScriptData */
/* ContentData
npc_lakota_windsong
npc_swiftmountain
npc_plucky
npc_enraged_panther
go_panther_cage
EndContentData */
/*######
# npc_lakota_windsong
@@ -15,18 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Ungoro Crater
SD%Complete: 100
SDComment: Support for Quest: 4245, 4491
SDCategory: Ungoro Crater
EndScriptData */
/* ContentData
npc_a-me
npc_ringo
EndContentData */
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -15,19 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Winterspring
SD%Complete: Almost Completely Emptied
SDComment: Vendor Rivern Frostwind. Quest Support 4901
SDCategory: Winterspring
EndScriptData */
/* ContentData
npc_rivern_frostwind
npc_ranshalla
go_elune_fire
EndContentData */
#include "CreatureScript.h"
#include "GameObjectScript.h"
#include "Player.h"
@@ -35,7 +22,6 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
// Theirs
/*######
## npc_rivern_frostwind
######*/
@@ -618,7 +604,6 @@ public:
void AddSC_winterspring()
{
// Theirs
new npc_rivern_frostwind();
new npc_ranshalla();
new go_elune_fire();
@@ -49,14 +49,6 @@ enum Creatures
enum Events
{
// Boss
EVENT_RESPAWN = 1,
EVENT_ROOTS,
EVENT_BASH,
EVENT_BOLT,
EVENT_REMOVE_MUSHROOM_POWER,
EVENT_MINI,
// Mushroom
EVENT_GROW,
EVENT_CHECK_PLAYER,
@@ -113,11 +105,46 @@ struct boss_amanitar : public BossAI
void JustEngagedWith(Unit* /*attacker*/) override
{
events.ScheduleEvent(EVENT_ROOTS, 5s, 9s);
events.ScheduleEvent(EVENT_BASH, 10s, 14s);
events.ScheduleEvent(EVENT_BOLT, 15s, 20s);
events.ScheduleEvent(EVENT_MINI, 1s);
events.ScheduleEvent(EVENT_RESPAWN, 40s, 60s);
ScheduleTimedEvent(5s, 9s, [&]{
DoCastRandomTarget(SPELL_ENTANGLING_ROOTS, 1, 100.0f);
}, 10s, 15s);
ScheduleTimedEvent(10s, 14s, [&] {
DoCastVictim(SPELL_BASH, false);
}, 15s, 20s);
ScheduleTimedEvent(15s, 20s, [&] {
DoCastAOE(SPELL_VENOM_BOLT_VOLLEY);
}, 15s, 20s);
ScheduleTimedEvent(40s, 60s, [&] {
while (!_mushroomsDeque.empty())
{
SummonMushroom(_mushroomsDeque.front());
_mushroomsDeque.pop_front();
}
}, 40s, 60s);
for (Position pos : MushroomPositions)
SummonMushroom(pos);
scheduler.Schedule(25s, 32s, [this](TaskContext context) {
if (SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true, -SPELL_MINI))
{
DoCastSelf(SPELL_REMOVE_MUSHROOM_POWER, true);
DoCastAOE(SPELL_MINI);
scheduler.Schedule(29s, [this](TaskContext)
{
DoCastAOE(SPELL_REMOVE_MUSHROOM_POWER, true);
});
context.Repeat(30s, 45s);
}
else
{
context.Repeat(1s);
}
});
}
void JustDied(Unit* /*killer*/) override
@@ -126,11 +153,6 @@ struct boss_amanitar : public BossAI
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
}
void JustSummoned(Creature* summon) override
{
summons.Summon(summon);
}
void SummonedCreatureDies(Creature* summon, Unit* killer) override
{
_mushroomsDeque.push_back(summon->GetPosition());
@@ -143,80 +165,6 @@ struct boss_amanitar : public BossAI
BossAI::EnterEvadeMode(why);
}
void ExecuteEvent(uint32 eventId) override
{
switch (eventId)
{
case EVENT_RESPAWN:
{
while (!_mushroomsDeque.empty())
{
SummonMushroom(_mushroomsDeque.front());
_mushroomsDeque.pop_front();
}
events.Repeat(40s, 60s);
break;
}
case EVENT_ROOTS:
{
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
{
DoCast(pTarget, SPELL_ENTANGLING_ROOTS, false);
}
events.Repeat(10s, 15s);
break;
}
case EVENT_BASH:
{
DoCastVictim(SPELL_BASH, false);
events.Repeat(15s, 20s);
break;
}
case EVENT_BOLT:
{
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
{
DoCast(pTarget, SPELL_VENOM_BOLT_VOLLEY, false);
}
events.Repeat(15s, 20s);
break;
}
case EVENT_REMOVE_MUSHROOM_POWER:
{
DoCastAOE(SPELL_REMOVE_MUSHROOM_POWER, true);
events.RescheduleEvent(EVENT_MINI, 1s);
break;
}
case EVENT_MINI:
{
if (!mushroomsSummoned)
{
mushroomsSummoned = true;
for (uint8 i = 0; i < MAX_MUSHROOMS_COUNT; ++i)
{
SummonMushroom(MushroomPositions[i]);
}
}
if (SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true, -SPELL_MINI))
{
DoCastSelf(SPELL_REMOVE_MUSHROOM_POWER, true);
DoCastAOE(SPELL_MINI);
events.RescheduleEvent(EVENT_REMOVE_MUSHROOM_POWER, 29s);
}
else
{
events.RepeatEvent(1000);
}
break;
}
}
}
private:
std::deque<Position> _mushroomsDeque;
bool mushroomsSummoned;
@@ -327,9 +275,7 @@ class spell_amanitar_remove_mushroom_power : public AuraScript
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* target = GetTarget())
{
target->RemoveAurasDueToSpell(SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS);
}
}
void Register() override
@@ -90,7 +90,6 @@ enum Points
POINT_ORB,
};
constexpr float DATA_GROUND_POSITION_Z = 11.308135f;
constexpr float DATA_SPHERE_DISTANCE = 25.0f;
#define DATA_SPHERE_ANGLE_OFFSET float(M_PI) / 2.0f
@@ -98,7 +97,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
{
npc_taldaram_flamesphere(Creature *pCreature) : NullCreatureAI(pCreature),
instance(pCreature->GetInstanceScript()),
uiDespawnTimer(13000),
moveTimer(0)
{
pCreature->SetReactState(REACT_PASSIVE);
@@ -112,14 +110,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
}
}
void MovementInform(uint32 type, uint32 id) override
{
if (type == POINT_MOTION_TYPE && id == POINT_ORB)
{
me->DisappearAndDie();
}
}
void IsSummonedBy(WorldObject* /*summoner*/) override
{
// Replace sphere instantly if sphere is summoned after prince death
@@ -131,9 +121,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
DoCastSelf(SPELL_FLAME_SPHERE_SPAWN_EFFECT);
DoCastSelf(SPELL_FLAME_SPHERE_VISUAL);
/// @todo: replace with DespawnOrUnsummon
uiDespawnTimer = 13000;
}
void JustDied(Unit* /*who*/) override
@@ -176,17 +163,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
moveTimer -= diff;
}
}
if (uiDespawnTimer)
{
if (uiDespawnTimer <= diff)
{
me->DisappearAndDie();
uiDespawnTimer = 0;
}
else
uiDespawnTimer -= diff;
}
}
void SetVictimPos(Position const& pos)
@@ -197,7 +173,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
private:
Position victimPos;
InstanceScript* instance;
uint32 uiDespawnTimer;
uint32 moveTimer;
};
@@ -245,7 +220,7 @@ struct boss_taldaram : public BossAI
{
if (action == ACTION_REMOVE_PRISON || action == ACTION_REMOVE_PRISON_AT_RESET)
{
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), DATA_GROUND_POSITION_Z, me->GetOrientation());
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetMapWaterOrGroundLevel(me->GetPosition()), me->GetOrientation());
instance->HandleGameObject(instance->GetGuidData(DATA_PRINCE_TALDARAM_PLATFORM), true);
if (action == ACTION_REMOVE_PRISON)
@@ -383,7 +358,7 @@ struct boss_taldaram : public BossAI
{
case EVENT_PRINCE_BLOODTHIRST:
{
DoCastSelf(SPELL_BLOODTHIRST);
DoCastVictim(SPELL_BLOODTHIRST);
events.Repeat(10s);
break;
}
@@ -392,7 +367,7 @@ struct boss_taldaram : public BossAI
if (Unit* victim = me->GetVictim())
{
DoCast(victim, SPELL_CONJURE_FLAME_SPHERE);
victimSperePos = *victim;
victimSperePos = victim->GetPosition();
}
if (!events.GetNextEventTime(EVENT_PRINCE_VANISH))
@@ -531,7 +506,7 @@ class spell_prince_taldaram_flame_sphere_summon : public SpellScript
void SetDest(SpellDestination& dest)
{
dest._position.m_positionZ = DATA_GROUND_POSITION_Z + 5.5f;
dest._position.m_positionZ = GetCaster()->GetPositionZ() + 5.5f;
}
void Register() override
@@ -293,7 +293,7 @@ public:
void OnCreatureCreate(Creature* creature) override
{
// apply ICC buff to pets/summons
if (GetData(DATA_BUFF_AVAILABLE) && creature->GetOwnerGUID().IsPlayer() && creature->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN) && creature->CanHaveThreatList())
if (GetData(DATA_BUFF_AVAILABLE) && creature->GetOwnerGUID().IsPlayer() && creature->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN) && creature->CanHaveThreatList())
if (Unit* owner = creature->GetOwner())
if (Player* plr = owner->ToPlayer())
{
@@ -337,9 +337,6 @@ public:
DoTeleportPlayer(target, 296.632f, -346.075f, 90.63f, 4.6f);
me->NearTeleportTo(296.632f, -346.075f, 110.0f, 4.6f, false);
me->SetControlled(true, UNIT_STATE_ROOT);
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
events.DelayEvents(25001); // +1 just to be sure
@@ -271,6 +271,7 @@ public:
king->SetDisableGravity(true);
me->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE);
me->GetMotionMaster()->MoveChase(me->GetVictim());
events.CancelEventGroup(1);
switch (BoatOrder[BoatNum - 1])
{
case 0:
@@ -298,7 +299,7 @@ public:
sf->SetSpeed(MOVE_RUN, 0.4f);
sf->AddAura(IsHeroic() ? SPELL_SPIRIT_FOUNT_H : SPELL_SPIRIT_FOUNT_N, sf);
sf->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
sf->GetMotionMaster()->MoveFollow(me->GetVictim(), 0, rand_norm()*M_PI * 2);
sf->GetMotionMaster()->MoveFollow(me->GetVictim(), 0, rand_norm()*M_PI * 2, MOTION_SLOT_ACTIVE, false, false);
}
break;
}
@@ -28,7 +28,6 @@
#include "SpellScript.h"
#include "SpellScriptLoader.h"
// Ours
enum eDrakeHunt
{
SPELL_DRAKE_HATCHLING_SUBDUED = 46691,
@@ -73,7 +72,6 @@ class spell_q11919_q11940_drake_hunt_aura : public AuraScript
}
};
// Theirs
/*######
## npc_sinkhole_kill_credit
######*/
@@ -2128,14 +2126,11 @@ public:
void AddSC_borean_tundra()
{
// Ours
RegisterSpellScript(spell_q11919_q11940_drake_hunt_aura);
new npc_thassarian();
new npc_thassarian2();
new npc_leryssa();
new npc_counselor_talbot();
// Theirs
new npc_sinkhole_kill_credit();
new npc_khunok_the_behemoth();
new npc_iruk();
@@ -24,7 +24,6 @@
#include "TaskScheduler.h"
#include "World.h"
// Ours
class npc_steam_powered_auctioneer : public CreatureScript
{
public:
@@ -399,7 +398,6 @@ public:
};
};
// Theirs
/*******************************************************
* npc_mageguard_dalaran
*******************************************************/
@@ -33,7 +33,6 @@
#include "SpellScriptLoader.h"
#include "Vehicle.h"
// Ours
/********
QUEST Conversing With the Depths (12032)
********/
@@ -1664,8 +1663,6 @@ public:
};
};
// Theirs
/*#####
# npc_commander_eligor_dawnbringer
#####*/
@@ -2245,7 +2242,6 @@ class spell_dragonblight_corrosive_spit : public AuraScript
void AddSC_dragonblight()
{
// Ours
new npc_conversing_with_the_depths_trigger();
new go_the_pearl_of_the_depths();
new npc_hourglass_of_eternity();
@@ -2266,12 +2262,9 @@ void AddSC_dragonblight()
new npc_q24545_vegard_dummy();
new npc_q24545_vegard();
new npc_spiritual_insight();
// Theirs
new npc_commander_eligor_dawnbringer();
RegisterSpellScript(spell_q12096_q12092_dummy);
RegisterSpellScript(spell_q12096_q12092_bark);
new npc_torturer_lecraft();
RegisterSpellScript(spell_dragonblight_corrosive_spit);
}
@@ -26,8 +26,6 @@
#include "SpellScript.h"
#include "SpellScriptLoader.h"
// Theirs
/*######
## Quest 12027: Mr. Floppy's Perilous Adventure
######*/
@@ -1262,7 +1260,6 @@ class spell_frog_kiss : public SpellScript
void AddSC_grizzly_hills()
{
// Theirs
new npc_emily();
new npc_mrfloppy();
new npc_ravenous_worg();
@@ -23,7 +23,6 @@
#include "ScriptedGossip.h"
#include "SpellInfo.h"
// Ours
class npc_attracted_reef_bull : public CreatureScript
{
public:
@@ -169,7 +168,6 @@ public:
}
};
// Theirs
/*######
## npc_apothecary_hanes
######*/
@@ -397,11 +395,8 @@ public:
void AddSC_howling_fjord()
{
// Ours
new npc_attracted_reef_bull();
new npc_your_inner_turmoil();
// Theirs
new npc_apothecary_hanes();
new npc_plaguehound_tracker();
new npc_razael_and_lyana();

Some files were not shown because too many files have changed in this diff Show More