Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
- index 4bfe28e..68b8b40 100644
- --- a/src/game/MovementHandler.cpp
- +++ b/src/game/MovementHandler.cpp
- @@ -371,6 +371,11 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
- ObjectGuid guid;
- recv_data >> guid;
- + if (Unit* mover = ObjectAccessor::GetUnit(*_player, guid))
- + _player->SetMover(mover);
- + else
- + _player->SetMover(NULL);
- +
- if(_player->GetMover()->GetObjectGuid() != guid)
- {
- sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is %s and should be %s",
- diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
- index 980cdb2..d9695b8 100644
- --- a/src/game/Spell.cpp
- +++ b/src/game/Spell.cpp
- @@ -1587,6 +1587,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
- case 28796: // Poison Bolt Volley
- case 29213: // Curse of the Plaguebringer
- case 31298: // Sleep
- + case 51904: // Limit of Summoned Ghouls
- unMaxTargets = 3;
- break;
- case 30843: // Enfeeble TODO: exclude top threat target from target selection
- diff --git a/src/game/Spell.h b/src/game/Spell.h
- index 5585c1f..f72e8f4 100644
- --- a/src/game/Spell.h
- +++ b/src/game/Spell.h
- @@ -395,6 +395,7 @@ class Spell
- void DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype);
- void DoSummon(SpellEffectIndex eff_idx);
- + void DoSummonPossessed(SpellEffectIndex eff_idx);
- void DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction = 0);
- void DoSummonGuardian(SpellEffectIndex eff_idx, uint32 forceFaction = 0);
- void DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc = 0);
- diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
- index 2f6672e..ac38f10 100644
- --- a/src/game/SpellEffects.cpp
- +++ b/src/game/SpellEffects.cpp
- @@ -2167,7 +2167,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
- if (Player* pPlayer = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself())
- pPlayer->KilledMonsterCredit(unitTarget->GetEntry(), unitTarget->GetObjectGuid());
- -
- + ((Creature*)unitTarget)->ForcedDespawn();
- return;
- }
- case 52308: // Take Sputum Sample
- @@ -4694,6 +4694,9 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx)
- }
- case SUMMON_PROP_GROUP_CONTROLLABLE:
- {
- + if (prop_id == 65 || prop_id == 428)
- + DoSummonPossessed(eff_idx);
- + else
- // no type here
- // maybe wrong - but thats the handler currently used for those
- DoSummonGuardian(eff_idx, summon_prop->FactionId);
- @@ -5040,6 +5043,58 @@ void Spell::EffectAddFarsight(SpellEffectIndex eff_idx)
- ((Player*)m_caster)->GetCamera().SetView(dynObj);
- }
- +void Spell::DoSummonPossessed(SpellEffectIndex eff_idx)
- +{
- + if (!m_caster || m_caster->GetTypeId() != TYPEID_PLAYER)
- + return;
- +
- + uint32 creature_entry = m_spellInfo->EffectMiscValue[eff_idx];
- + if (!creature_entry)
- + return;
- +
- + int32 duration = GetSpellDuration(m_spellInfo);
- +
- + float px, py, pz;
- + // If dest location if present
- + if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
- + {
- + // Summon 1 unit in dest location
- + px = m_targets.m_destX;
- + py = m_targets.m_destY;
- + pz = m_targets.m_destZ;
- + }
- + // Summon if dest location not present near caster
- + else
- + m_caster->GetClosePoint(px,py,pz,1.0f);
- +
- + TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_OR_DEAD_DESPAWN;
- + Creature* summon = m_caster->SummonCreature(creature_entry,px,py,pz,m_caster->GetOrientation(),summonType,duration);
- +
- + if (summon)
- + {
- + summon->addUnitState(UNIT_STAT_CONTROLLED);
- + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);
- + summon->SetCharmerGuid(m_caster->GetObjectGuid());
- + summon->setFaction(m_caster->getFaction());
- +
- + ((Player*)m_caster)->GetCamera().SetView(summon);
- +
- + m_caster->SetCharm(summon);
- +
- + ((Player*)m_caster)->SetClientControl(summon, 1);
- + ((Player*)m_caster)->SetMover(summon);
- +
- + summon->CombatStop(true);
- + summon->DeleteThreatList();
- +
- + if (CharmInfo* charmInfo = summon->InitCharmInfo(summon))
- + charmInfo->InitPossessCreateSpells();
- +
- + if (m_caster->GetTypeId() == TYPEID_PLAYER)
- + ((Player*)m_caster)->PossessSpellInitialize();
- + }
- +}
- +
- void Spell::DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction)
- {
- uint32 creature_entry = m_spellInfo->EffectMiscValue[eff_idx];
- @@ -7157,6 +7212,14 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
- m_caster->CastSpell(m_caster, 51864, true);
- return;
- }
- + case 51904: // Summon Ghouls On Scarlet Crusade
- + {
- + if(!unitTarget)
- + return;
- +
- + unitTarget->CastSpell(unitTarget, 54522, true);
- + break;
- + }
- case 51910: // Kickin' Nass: Quest Completion
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- @@ -7170,6 +7233,22 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
- }
- return;
- }
- + case 52694: // Recall Eye of Acherus
- + {
- + if(!m_caster || m_caster->GetTypeId() != TYPEID_UNIT)
- + return;
- +
- + if (Unit* target = m_caster->GetCharmer())
- + {
- + target->RemoveAurasDueToSpell(51852);
- + target->SetCharm(NULL);
- +
- + ((Player*)target)->SetMover(NULL);
- + }
- +
- + ((Creature*)m_caster)->ForcedDespawn();
- + return;
- + }
- case 52751: // Death Gate
- {
- if (!unitTarget || unitTarget->getClass() != CLASS_DEATH_KNIGHT)
- diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
- index 3ce6324..7595527 100644
- --- a/src/game/TemporarySummon.cpp
- +++ b/src/game/TemporarySummon.cpp
- @@ -126,7 +126,7 @@ void TemporarySummon::Update( uint32 update_diff, uint32 diff )
- return;
- }
- - if (!isInCombat() && isAlive() )
- + if (isAlive())
- {
- if (m_timer <= update_diff)
- {
- -- mangos database
- UPDATE creature_template SET ScriptName = 'npc_eye_of_acherus', minlevel = 55, maxlevel = 55 WHERE entry = 28511;
- REPLACE INTO creature_template_addon (entry, auras) VALUES (28525, 51939),(28542, 51939),(28543, 51939),(28544, 51939);
- UPDATE quest_template SET ReqSpellCast1 = 51858, ReqSpellCast2 = 51858, ReqSpellCast3 = 51858, ReqSpellCast4 = 51858 WHERE entry = 12641;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement