Advertisement
Guest User

eye of acherus

a guest
Nov 16th, 2011
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.52 KB | None | 0 0
  1. diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
  2. index 4bfe28e..68b8b40 100644
  3. --- a/src/game/MovementHandler.cpp
  4. +++ b/src/game/MovementHandler.cpp
  5. @@ -371,6 +371,11 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
  6. ObjectGuid guid;
  7. recv_data >> guid;
  8.  
  9. + if (Unit* mover = ObjectAccessor::GetUnit(*_player, guid))
  10. + _player->SetMover(mover);
  11. + else
  12. + _player->SetMover(NULL);
  13. +
  14. if(_player->GetMover()->GetObjectGuid() != guid)
  15. {
  16. sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is %s and should be %s",
  17. diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
  18. index 980cdb2..d9695b8 100644
  19. --- a/src/game/Spell.cpp
  20. +++ b/src/game/Spell.cpp
  21. @@ -1587,6 +1587,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
  22. case 28796: // Poison Bolt Volley
  23. case 29213: // Curse of the Plaguebringer
  24. case 31298: // Sleep
  25. + case 51904: // Limit of Summoned Ghouls
  26. unMaxTargets = 3;
  27. break;
  28. case 30843: // Enfeeble TODO: exclude top threat target from target selection
  29. diff --git a/src/game/Spell.h b/src/game/Spell.h
  30. index 5585c1f..f72e8f4 100644
  31. --- a/src/game/Spell.h
  32. +++ b/src/game/Spell.h
  33. @@ -395,6 +395,7 @@ class Spell
  34.  
  35. void DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype);
  36. void DoSummon(SpellEffectIndex eff_idx);
  37. + void DoSummonPossessed(SpellEffectIndex eff_idx);
  38. void DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction = 0);
  39. void DoSummonGuardian(SpellEffectIndex eff_idx, uint32 forceFaction = 0);
  40. void DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc = 0);
  41. diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
  42. index 2f6672e..ac38f10 100644
  43. --- a/src/game/SpellEffects.cpp
  44. +++ b/src/game/SpellEffects.cpp
  45. @@ -2167,7 +2167,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
  46.  
  47. if (Player* pPlayer = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself())
  48. pPlayer->KilledMonsterCredit(unitTarget->GetEntry(), unitTarget->GetObjectGuid());
  49. -
  50. + ((Creature*)unitTarget)->ForcedDespawn();
  51. return;
  52. }
  53. case 52308: // Take Sputum Sample
  54. @@ -4694,6 +4694,9 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx)
  55. }
  56. case SUMMON_PROP_GROUP_CONTROLLABLE:
  57. {
  58. + if (prop_id == 65 || prop_id == 428)
  59. + DoSummonPossessed(eff_idx);
  60. + else
  61. // no type here
  62. // maybe wrong - but thats the handler currently used for those
  63. DoSummonGuardian(eff_idx, summon_prop->FactionId);
  64. @@ -5040,6 +5043,58 @@ void Spell::EffectAddFarsight(SpellEffectIndex eff_idx)
  65. ((Player*)m_caster)->GetCamera().SetView(dynObj);
  66. }
  67.  
  68. +void Spell::DoSummonPossessed(SpellEffectIndex eff_idx)
  69. +{
  70. + if (!m_caster || m_caster->GetTypeId() != TYPEID_PLAYER)
  71. + return;
  72. +
  73. + uint32 creature_entry = m_spellInfo->EffectMiscValue[eff_idx];
  74. + if (!creature_entry)
  75. + return;
  76. +
  77. + int32 duration = GetSpellDuration(m_spellInfo);
  78. +
  79. + float px, py, pz;
  80. + // If dest location if present
  81. + if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
  82. + {
  83. + // Summon 1 unit in dest location
  84. + px = m_targets.m_destX;
  85. + py = m_targets.m_destY;
  86. + pz = m_targets.m_destZ;
  87. + }
  88. + // Summon if dest location not present near caster
  89. + else
  90. + m_caster->GetClosePoint(px,py,pz,1.0f);
  91. +
  92. + TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_OR_DEAD_DESPAWN;
  93. + Creature* summon = m_caster->SummonCreature(creature_entry,px,py,pz,m_caster->GetOrientation(),summonType,duration);
  94. +
  95. + if (summon)
  96. + {
  97. + summon->addUnitState(UNIT_STAT_CONTROLLED);
  98. + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);
  99. + summon->SetCharmerGuid(m_caster->GetObjectGuid());
  100. + summon->setFaction(m_caster->getFaction());
  101. +
  102. + ((Player*)m_caster)->GetCamera().SetView(summon);
  103. +
  104. + m_caster->SetCharm(summon);
  105. +
  106. + ((Player*)m_caster)->SetClientControl(summon, 1);
  107. + ((Player*)m_caster)->SetMover(summon);
  108. +
  109. + summon->CombatStop(true);
  110. + summon->DeleteThreatList();
  111. +
  112. + if (CharmInfo* charmInfo = summon->InitCharmInfo(summon))
  113. + charmInfo->InitPossessCreateSpells();
  114. +
  115. + if (m_caster->GetTypeId() == TYPEID_PLAYER)
  116. + ((Player*)m_caster)->PossessSpellInitialize();
  117. + }
  118. +}
  119. +
  120. void Spell::DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction)
  121. {
  122. uint32 creature_entry = m_spellInfo->EffectMiscValue[eff_idx];
  123. @@ -7157,6 +7212,14 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
  124. m_caster->CastSpell(m_caster, 51864, true);
  125. return;
  126. }
  127. + case 51904: // Summon Ghouls On Scarlet Crusade
  128. + {
  129. + if(!unitTarget)
  130. + return;
  131. +
  132. + unitTarget->CastSpell(unitTarget, 54522, true);
  133. + break;
  134. + }
  135. case 51910: // Kickin' Nass: Quest Completion
  136. {
  137. if (m_caster->GetTypeId() != TYPEID_PLAYER)
  138. @@ -7170,6 +7233,22 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
  139. }
  140. return;
  141. }
  142. + case 52694: // Recall Eye of Acherus
  143. + {
  144. + if(!m_caster || m_caster->GetTypeId() != TYPEID_UNIT)
  145. + return;
  146. +
  147. + if (Unit* target = m_caster->GetCharmer())
  148. + {
  149. + target->RemoveAurasDueToSpell(51852);
  150. + target->SetCharm(NULL);
  151. +
  152. + ((Player*)target)->SetMover(NULL);
  153. + }
  154. +
  155. + ((Creature*)m_caster)->ForcedDespawn();
  156. + return;
  157. + }
  158. case 52751: // Death Gate
  159. {
  160. if (!unitTarget || unitTarget->getClass() != CLASS_DEATH_KNIGHT)
  161. diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
  162. index 3ce6324..7595527 100644
  163. --- a/src/game/TemporarySummon.cpp
  164. +++ b/src/game/TemporarySummon.cpp
  165. @@ -126,7 +126,7 @@ void TemporarySummon::Update( uint32 update_diff, uint32 diff )
  166. return;
  167. }
  168.  
  169. - if (!isInCombat() && isAlive() )
  170. + if (isAlive())
  171. {
  172. if (m_timer <= update_diff)
  173. {
  174.  
  175.  
  176.  
  177. -- mangos database
  178. UPDATE creature_template SET ScriptName = 'npc_eye_of_acherus', minlevel = 55, maxlevel = 55 WHERE entry = 28511;
  179.  
  180. REPLACE INTO creature_template_addon (entry, auras) VALUES (28525, 51939),(28542, 51939),(28543, 51939),(28544, 51939);
  181.  
  182. UPDATE quest_template SET ReqSpellCast1 = 51858, ReqSpellCast2 = 51858, ReqSpellCast3 = 51858, ReqSpellCast4 = 51858 WHERE entry = 12641;
  183.  
  184.  
  185.  
  186.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement