Core/Misc: Fix compile errors introduced in previous merge

There are probably other merge issues that got through, please report them
This commit is contained in:
Nay
2013-01-28 02:54:27 +00:00
parent b404e0bec1
commit 98f01c2b12
11 changed files with 83 additions and 92 deletions

View File

@@ -973,7 +973,7 @@ void Battleground::EndBattleground(uint32 winner)
player->GetSession()->SendPacket(&pvpLogData);
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player, player->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, player->GetBattlegroundQueueJoinTime(GetTypeID()), GetElapsedTime(), GetArenaType());
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player, player->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, player->GetBattlegroundQueueJoinTime(GetTypeID()), GetElapsedTime(), GetArenaType());
player->GetSession()->SendPacket(&data);
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1);
@@ -1204,9 +1204,13 @@ void Battleground::AddPlayer(Player* player)
sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, player->GetGUID());
SendPacketToTeam(team, &data, player, false);
// BG Status packet
BattlegroundQueueTypeId bgQueueTypeId = sBattlegroundMgr->BGQueueTypeId(m_TypeID, GetArenaType());
uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player, queueSlot, STATUS_IN_PROGRESS, player->GetBattlegroundQueueJoinTime(m_TypeID), GetElapsedTime(), GetArenaType());
player->GetSession()->SendPacket(&data);
player->RemoveAurasByType(SPELL_AURA_MOUNTED);
// add arena specific auras

View File

@@ -538,7 +538,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
_player->CleanupAfterTaxiFlight();
}
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType(), ginfo.Team);
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, _player, queueSlot, STATUS_IN_PROGRESS, _player->GetBattlegroundQueueJoinTime(bgTypeId), bg->GetElapsedTime(), bg->GetArenaType());
_player->GetSession()->SendPacket(&data);
// remove battleground queue status from BGmgr
@@ -622,7 +622,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recvData*/)
{
// this line is checked, i only don't know if GetElapsedTime() is changing itself after bg end!
// send status in Battleground
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, i, STATUS_IN_PROGRESS, bg->GetEndTime(), bg->GetStartTime(), arenaType, _player->GetBGTeam());
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, GetPlayer(), i, STATUS_IN_PROGRESS, _player->GetBattlegroundQueueJoinTime(bgTypeId), bg->GetElapsedTime(), arenaType);
SendPacket(&data);
continue;
}

View File

@@ -165,7 +165,7 @@ bool RandomMovementGenerator<Creature>::GetResetPos(Creature* creature, float& x
creature->GetRespawnPosition(x, y, z, NULL, &radius);
// use current if in range
if (creature.IsWithinDist2d(x, y, radius))
if (creature->IsWithinDist2d(x, y, radius))
creature->GetPosition(x, y, z);
return true;

View File

@@ -60,23 +60,22 @@ namespace Movement
int32 MoveSplineInit::Launch()
{
MoveSpline& move_spline = *unit.movespline;
MoveSpline& move_spline = *unit->movespline;
Location real_position(unit.GetPositionX(), unit.GetPositionY(), unit.GetPositionZMinusOffset(), unit.GetOrientation());
Location real_position(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZMinusOffset(), unit->GetOrientation());
// Elevators also use MOVEMENTFLAG_ONTRANSPORT but we do not keep track of their position changes
if (unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit.GetTransGUID())
if (unit->GetTransGUID())
{
transport = true;
real_position.x = unit.GetTransOffsetX();
real_position.y = unit.GetTransOffsetY();
real_position.z = unit.GetTransOffsetZ();
real_position.orientation = unit.GetTransOffsetO();
real_position.x = unit->GetTransOffsetX();
real_position.y = unit->GetTransOffsetY();
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 CalculatePath spline position and update map position in much greater intervals
// this also allows calculate spline position and update map position in much greater intervals
// Don't compute for transport movement if the unit is in a motion between two transports
if (!move_spline.Finalized() && move_spline.onTransport == (unit.GetTransGUID() != 0))
if (!move_spline.Finalized() && move_spline.onTransport == (unit->GetTransGUID() != 0))
real_position = move_spline.ComputePosition();
// should i do the things that user should do? - no.
@@ -86,7 +85,7 @@ namespace Movement
// correct first vertex
args.path[0] = real_position;
args.initialOrientation = real_position.orientation;
move_spline.onTransport = (unit.GetTransGUID() != 0);
move_spline.onTransport = (unit->GetTransGUID() != 0);
uint32 moveFlags = unit->m_movementInfo.GetMovementFlags();
if (args.flags.walkmode)
@@ -105,27 +104,27 @@ namespace Movement
if (moveFlags & MOVEMENTFLAG_ROOT)
moveFlags &= ~MOVEMENTFLAG_MASK_MOVING;
unit.m_movementInfo.SetMovementFlags(moveFlags);
unit->m_movementInfo.SetMovementFlags(moveFlags);
move_spline.Initialize(args);
WorldPacket data(SMSG_MONSTER_MOVE, 64);
data.append(unit->GetPackGUID());
if (unit.GetTransGUID())
if (unit->GetTransGUID())
{
data.SetOpcode(SMSG_MONSTER_MOVE_TRANSPORT);
data.appendPackGUID(unit.GetTransGUID());
data << int8(unit.GetTransSeat());
data.appendPackGUID(unit->GetTransGUID());
data << int8(unit->GetTransSeat());
}
PacketBuilder::WriteMonsterMove(move_spline, data);
unit->SendMessageToSet(&data,true);
unit->SendMessageToSet(&data, true);
return move_spline.Duration();
}
void MoveSplineInit::Stop()
{
MoveSpline& move_spline = *unit.movespline;
MoveSpline& move_spline = *unit->movespline;
// No need to stop if we are not moving
if (move_spline.Finalized())
@@ -133,30 +132,30 @@ namespace Movement
Location loc = move_spline.ComputePosition();
args.flags = MoveSplineFlag::Done;
unit.m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FORWARD);
unit->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FORWARD);
move_spline.Initialize(args);
WorldPacket data(SMSG_MONSTER_MOVE, 64);
data.append(unit.GetPackGUID());
if (unit.GetTransGUID())
data.append(unit->GetPackGUID());
if (unit->GetTransGUID())
{
data.SetOpcode(SMSG_MONSTER_MOVE_TRANSPORT);
data.appendPackGUID(unit.GetTransGUID());
data << int8(unit.GetTransSeat());
data.appendPackGUID(unit->GetTransGUID());
data << int8(unit->GetTransSeat());
}
PacketBuilder::WriteStopMovement(loc, args.splineId, data);
unit.SendMessageToSet(&data, true);
unit->SendMessageToSet(&data, true);
}
MoveSplineInit::MoveSplineInit(Unit& m) : unit(m)
MoveSplineInit::MoveSplineInit(Unit* m) : unit(m)
{
args.splineId = splineIdGen.NewId();
// Elevators also use MOVEMENTFLAG_ONTRANSPORT but we do not keep track of their position changes
args.TransformForTransport = unit.HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit->GetTransGUID();
args.TransformForTransport = unit->GetTransGUID();
// mix existing state into new
args.flags.walkmode = unit.m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING);
args.flags.flying = unit.m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY);
args.flags.walkmode = unit->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING);
args.flags.flying = unit->m_movementInfo.HasMovementFlag(MovementFlags(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY));
args.flags.smoothGroundPath = true; // enabled by default, CatmullRom mode or client config "pathSmoothing" will disable this
}
@@ -202,7 +201,7 @@ namespace Movement
void MoveSplineInit::SetFall()
{
args.flags.EnableFalling();
args.flags.fallingSlow = unit.HasUnitMovementFlag(MOVEMENTFLAG_FALLING_SLOW);
args.flags.fallingSlow = unit->HasUnitMovementFlag(MOVEMENTFLAG_FALLING_SLOW);
}
Vector3 TransportPathTransform::operator()(Vector3 input)

View File

@@ -298,7 +298,7 @@ class npc_blazing_monstrosity : public CreatureScript
passenger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// Hack to relocate vehicle on vehicle so exiting players are not moved under map
Movement::MoveSplineInit init(*passenger);
Movement::MoveSplineInit init(passenger);
init.DisableTransportPathTransformations();
init.MoveTo(0.6654003f, 0.0f, 1.9815f);
init.SetFacing(0.0f);

View File

@@ -688,7 +688,7 @@ class spell_mage_mage_ward : public SpellScriptLoader
if (AuraEffect* aurEff = GetTarget()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_GENERIC, ICON_MAGE_INCANTER_S_ABSORPTION, EFFECT_0))
{
int32 bp = CalculatePct(absorbAmount, aurEff->GetAmount());
GetTarget()->CastCustomSpell(GetTarget(), SPELL_MAGE_INCANTER_S_ABSORPTION_TRIGGERED, &bp, NULL, NULL, true);
GetTarget()->CastCustomSpell(GetTarget(), SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true);
}
}
@@ -720,14 +720,14 @@ class spell_mage_mana_shield : public SpellScriptLoader
if (AuraEffect* aurEff = GetTarget()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_GENERIC, ICON_MAGE_INCANTER_S_ABSORPTION, EFFECT_0))
{
int32 bp = CalculatePct(absorbAmount, aurEff->GetAmount());
GetTarget()->CastCustomSpell(GetTarget(), SPELL_MAGE_INCANTER_S_ABSORPTION_TRIGGERED, &bp, NULL, NULL, true);
GetTarget()->CastCustomSpell(GetTarget(), SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true);
}
}
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_INCANTER_S_ABSORPTION_KNOCKBACK, true);
GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_INCANTERS_ABSORBTION_R1, true);
}
void Register()

View File

@@ -54,8 +54,9 @@ enum PriestSpells
enum PriestSpellIcons
{
PRIEST_ICON_ID_BORROWED_TIME = 2899,
PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT = 3021,
PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874
PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874,
};
// -47509 - Divine Aegis

View File

@@ -29,28 +29,29 @@
enum WarlockSpells
{
SPELL_WARLOCK_BANE_OF_DOOM_EFFECT = 18662,
SPELL_WARLOCK_CURSE_OF_DOOM_EFFECT = 18662,
SPELL_WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST = 62388,
SPELL_WARLOCK_DEMONIC_CIRCLE_SUMMON = 48018,
SPELL_WARLOCK_DEMONIC_CIRCLE_TELEPORT = 48020,
SPELL_WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST = 62388,
SPELL_WARLOCK_DEMONIC_EMPOWERMENT_SUCCUBUS = 54435,
SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER = 54443,
SPELL_WARLOCK_DEMONIC_EMPOWERMENT_FELGUARD = 54508,
SPELL_WARLOCK_DEMONIC_EMPOWERMENT_FELHUNTER = 54509,
SPELL_WARLOCK_DEMONIC_EMPOWERMENT_IMP = 54444,
SPELL_WARLOCK_DEMONIC_EMPOWERMENT_SUCCUBUS = 54435,
SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER = 54443,
SPELL_WARLOCK_FEL_SYNERGY_HEAL = 54181,
SPELL_WARLOCK_GLYPH_OF_SIPHON_LIFE = 63106,
SPELL_WARLOCK_IMPROVED_HEALTHSTONE_R1 = 18692,
SPELL_WARLOCK_IMPROVED_HEALTHSTONE_R2 = 18693,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R1 = 18703,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R2 = 18704,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1 = 60955,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956,
SPELL_WARLOCK_HAUNT = 48181,
SPELL_WARLOCK_HAUNT_HEAL = 48210,
SPELL_WARLOCK_IMPROVED_HEALTHSTONE_R1 = 18692,
SPELL_WARLOCK_IMPROVED_HEALTHSTONE_R2 = 18693,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1 = 60955,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R1 = 18703,
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R2 = 18704,
SPELL_WARLOCK_LIFE_TAP_ENERGIZE = 31818,
SPELL_WARLOCK_LIFE_TAP_ENERGIZE_2 = 32553,
SPELL_WARLOCK_SOULSHATTER = 32835,
SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106,
SPELL_WARLOCK_SOULSHATTER = 32835,
SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117
};
@@ -647,6 +648,34 @@ class spell_warl_life_tap : public SpellScriptLoader
}
};
// 18541 - Ritual of Doom Effect
class spell_warl_ritual_of_doom_effect : public SpellScriptLoader
{
public:
spell_warl_ritual_of_doom_effect() : SpellScriptLoader("spell_warl_ritual_of_doom_effect") { }
class spell_warl_ritual_of_doom_effect_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warl_ritual_of_doom_effect_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
caster->CastSpell(caster, GetEffectValue(), true);
}
void Register()
{
OnEffectHit += SpellEffectFn(spell_warl_ritual_of_doom_effect_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_warl_ritual_of_doom_effect_SpellScript();
}
};
// 27285 - Seed of Corruption
/// Updated 4.3.4
class spell_warl_seed_of_corruption : public SpellScriptLoader
@@ -846,7 +875,6 @@ void AddSC_warlock_spell_scripts()
new spell_warl_bane_of_doom();
new spell_warl_banish();
new spell_warl_create_healthstone();
new spell_warl_curse_of_doom();
new spell_warl_demonic_circle_summon();
new spell_warl_demonic_circle_teleport();
new spell_warl_demonic_empowerment();

View File

@@ -31,7 +31,6 @@ enum WarriorSpells
SPELL_WARRIOR_BLOODTHIRST = 23885,
SPELL_WARRIOR_BLOODTHIRST_DAMAGE = 23881,
SPELL_WARRIOR_CHARGE = 34846,
SPELL_WARRIOR_DAMAGE_SHIELD_DAMAGE = 59653,
SPELL_WARRIOR_DEEP_WOUNDS_RANK_1 = 12162,
SPELL_WARRIOR_DEEP_WOUNDS_RANK_2 = 12850,
SPELL_WARRIOR_DEEP_WOUNDS_RANK_3 = 12868,
@@ -43,7 +42,6 @@ enum WarriorSpells
SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_TALENT = 64976,
SPELL_WARRIOR_LAST_STAND_TRIGGERED = 12976,
SPELL_WARRIOR_SLAM = 50782,
SPELL_WARRIOR_SLAM = 50783,
SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK = 26654,
SPELL_WARRIOR_TAUNT = 355,
SPELL_WARRIOR_UNRELENTING_ASSAULT_RANK_1 = 46859,
@@ -201,44 +199,6 @@ class spell_warr_concussion_blow : public SpellScriptLoader
}
};
// -58872 - Damage Shield
class spell_warr_damage_shield : public SpellScriptLoader
{
public:
spell_warr_damage_shield() : SpellScriptLoader("spell_warr_damage_shield") { }
class spell_warr_damage_shield_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_damage_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
{
if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_DAMAGE_SHIELD_DAMAGE))
return false;
return true;
}
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
// % of amount blocked
int32 damage = CalculatePct(int32(GetTarget()->GetShieldBlockValue()), aurEff->GetAmount());
GetTarget()->CastCustomSpell(SPELL_WARRIOR_DAMAGE_SHIELD_DAMAGE, SPELLVALUE_BASE_POINT0, damage, eventInfo.GetProcTarget(), true, NULL, aurEff);
}
void Register()
{
OnEffectProc += AuraEffectProcFn(spell_warr_damage_shield_AuraScript::OnProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const
{
return new spell_warr_damage_shield_AuraScript();
}
};
/// Updated 4.3.4
class spell_warr_deep_wounds : public SpellScriptLoader
{
@@ -770,7 +730,6 @@ void AddSC_warrior_spell_scripts()
new spell_warr_bloodthirst_heal();
new spell_warr_charge();
new spell_warr_concussion_blow();
new spell_warr_damage_shield();
new spell_warr_deep_wounds();
new spell_warr_execute();
new spell_warr_improved_spell_reflection();

View File

@@ -12,4 +12,4 @@ add_subdirectory(map_extractor)
add_subdirectory(vmap4_assembler)
add_subdirectory(vmap4_extractor)
add_subdirectory(mmaps_generator)
add_subdirectory(mesh_extractor)
# add_subdirectory(mesh_extractor)

View File

@@ -901,7 +901,7 @@ bool ConvertADT(char *filename, char *filename2, int /*cell_y*/, int /*cell_x*/,
{
for (int j = 0; j < ADT_CELLS_PER_GRID; ++j)
{
adt_MCNK * cell = cells->getMCNK(i,j);
adt_MCNK * cell = adt.cells[i][j];
if (!cell)
continue;
holes[i][j] = cell->holes;