• Страница 1 из 1
  • 1
Архив - только для чтения
Модератор форума: andycrowz  
Eye of Acherus (for rev.10109)
bazyy
Центурион
Патч на Око Акеруса для rev.10109
Скачать
Это необходимо залить в БД, если Вы используете патч Vehicle:
Code
UPDATE creature_template SET InhabitType = 3 WHERE entry = 28511;

Взято с http://getmangos.com/

1. Вы сейчас в интернете.
2. Вы на сайте wowjp.net
3. Вы читаете это.
5. Вы не заметили что отсутствует пункт 4.
6. Вы сейчас это проверили.
7. Вы улыбаетесь.
8. Поставь себе в подпись и нас будит больше
Сообщение # 1 отредактировано bazyy - Четверг, 01.07.2010, 17:03
AlO
Маршал
10160+
в ядро
Code
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 3a8abf1..8509187 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1472,6 +1472,8 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
                   case 28796:                    // Poison Bolt Volley
                   case 29213:                    // Curse of the Plaguebringer
                   case 31298:                    // Sleep
+                case 51904:                    // Limiting the count of Summoned Ghouls
+                case 54522:
                       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 27aaf4d..0c47f3c 100644
--- a/src/game/Spell.h
+++ b/src/game/Spell.h
@@ -291,6 +291,7 @@ class Spell
           void EffectEnchantItemPerm(SpellEffectIndex eff_idx);
           void EffectEnchantItemTmp(SpellEffectIndex eff_idx);
           void EffectTameCreature(SpellEffectIndex eff_idx);
+        void EffectSummonPossessed(SpellEffectIndex eff_idx);
           void EffectSummonPet(SpellEffectIndex eff_idx);
           void EffectLearnPetSpell(SpellEffectIndex eff_idx);
           void EffectWeaponDmg(SpellEffectIndex eff_idx);
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 3bc6524..1f6b358 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3647,7 +3647,7 @@ void Aura::HandleModPossess(bool apply, bool Real)
     
           if(target->GetTypeId() == TYPEID_UNIT)
           {
-            ((Creature*)target)->AIM_Initialize();
+            //((Creature*)target)->AIM_Initialize();
           }
           else if(target->GetTypeId() == TYPEID_PLAYER)
           {
@@ -8348,6 +8348,14 @@ void Aura::HandlePhase(bool apply, bool Real)
       }
     
       // no-phase is also phase state so same code for apply and remove
+    uint32 phase;
+
+    // i think phase mask should be added to current mask, NOT overwrite it
+    // at least for this spell
+    if (m_spellProto->Id == 51852)
+        phase = apply ? (target->GetPhaseMask() | GetMiscValue()) : (target->GetPhaseMask() & ~GetMiscValue());
+    else
+        phase = apply ? GetMiscValue() : PHASEMASK_NORMAL;
     
       // phase auras normally not expected at BG but anyway better check
       if(target->GetTypeId() == TYPEID_PLAYER)
@@ -8359,9 +8367,9 @@ void Aura::HandlePhase(bool apply, bool Real)
     
           // GM-mode have mask 0xFFFFFFFF
           if(!((Player*)target)->isGameMaster())
-            target->SetPhaseMask(apply ? GetMiscValue() : PHASEMASK_NORMAL, false);
+            target->SetPhaseMask(phase, false);
     
-        ((Player*)target)->GetSession()->SendSetPhaseShift(apply ? GetMiscValue() : PHASEMASK_NORMAL);
+        ((Player*)target)->GetSession()->SendSetPhaseShift(phase);
     
           if (GetEffIndex() == EFFECT_INDEX_0)
           {
@@ -8385,9 +8393,15 @@ void Aura::HandlePhase(bool apply, bool Real)
                   }
               }
           }
+
+        if(target->GetCharm() && !apply)//remove other auras from charm on unapply
+        {
+            Creature * creat=((Creature*)target->GetCharm());
+            creat->RemoveAurasDueToSpellByCancel(GetId());
+        }
       }
       else
-        target->SetPhaseMask(apply ? GetMiscValue() : PHASEMASK_NORMAL, false);
+        target->SetPhaseMask(phase, false);
     
       // need triggering visibility update base at phase update of not GM invisible (other GMs anyway see in any phases)
       if(target->GetVisibility() != VISIBILITY_OFF)
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 218c5b9..b195ddf 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1581,6 +1581,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
     
                       return;
                   }
+                case 51858:      // Siphon of Acherus - Complete Quest
+                {
+                    if (!m_caster || !m_caster->isAlive())
+                        return;
+
+                    ((Player*)m_originalCaster->GetCharmer())->KilledMonsterCredit(m_caster->GetEntry(), m_caster->GetGUID());
+
+                }
                   case 52308:                    // Take Sputum Sample
                   {
                       switch(eff_idx)
@@ -3886,9 +3894,17 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx)
           }
           case SUMMON_PROP_GROUP_CONTROLLABLE:
           {
-            // no type here
-            // maybe wrong - but thats the handler currently used for those
-            DoSummonGuardian(eff_idx, summon_prop->FactionId);
+            switch(prop_id)
+            {
+                //SUMMON_TYPE_POSESSED   = 65
+                //SUMMON_TYPE_POSESSED2   = 428
+                case 65:
+                case 428:
+                    EffectSummonPossessed(eff_idx);
+                    break;
+            default: DoSummonGuardian(eff_idx, summon_prop->FactionId);
+            break;
+            }
               break;
           }
           case SUMMON_PROP_GROUP_VEHICLE:
@@ -4744,6 +4760,37 @@ void Spell::EffectTameCreature(SpellEffectIndex /*eff_idx*/)
       plr->PetSpellInitialize();
   }
     
+void Spell::EffectSummonPossessed(SpellEffectIndex eff_idx)
+{
+    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_TIMED_OR_CORPSE_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
+    Creature *spawnCreature = m_caster->SummonCreature(creature_entry, px, py, pz, m_caster->GetOrientation(), summonType, duration);
+
+    Unit* caster = GetAffectiveCaster();
+    Aura* aur = CreateAura(m_spellInfo, eff_idx, &m_currentBasePoints[eff_idx], spellAuraHolder, spawnCreature, caster, m_CastItem);
+    Modifier* modifier=aur->GetModifier();
+    aur->SetModifier(SPELL_AURA_MOD_POSSESS,modifier->m_amount,modifier->periodictime,modifier->m_miscvalue);
+    spellAuraHolder->AddAura(aur, eff_idx);
+}
+
   void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
   {
       uint32 petentry = m_spellInfo->EffectMiscValue[eff_idx];
@@ -5911,6 +5958,30 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
                       }
                       return;
                   }
+                case 51904:                    // Summon Ghouls Of Scarlet Crusade
+                {
+                    if(!unitTarget)
+                        return;
+
+                    unitTarget->CastSpell(unitTarget, 54522, true);
+                    break;
+                }
+                case 52694:                    // Recall Eye of Acherus
+                {
+                    if(!m_caster || m_caster->GetTypeId() != TYPEID_UNIT || !(m_caster->isCharmed()))
+                        return;
+
+                    Creature *eye = ((Creature*)m_caster);
+                    if(m_caster->GetCharmer()->GetTypeId() != TYPEID_PLAYER)
+                        return;
+
+                    Player *player = ((Player*)m_caster->GetCharmer());
+                    if(eye->isInCombat())
+                        return;
+
+                    eye->GetMap()->CreatureRelocation(eye, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
+                    eye->RemoveAurasDueToSpellByCancel(51852);
+                }
                   case 52751:                    // Death Gate
                   {
                       if (!unitTarget || unitTarget->getClass() != CLASS_DEATH_KNIGHT)

в SD2 ничего не изменилось:

Code
Index: scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp
===================================================================
--- scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp    (revision 1735)
+++ scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp    (working copy)
@@ -1100,6 +1100,77 @@
       return false;
   }
     
+/*######
+## npc_eye_of_acherus
+######*/
+
+struct MANGOS_DLL_DECL npc_eye_of_acherusAI : public ScriptedAI
+{
+    npc_eye_of_acherusAI(Creature *pCreature) : ScriptedAI(pCreature)
+    {
+        m_creature->SetActiveObjectState(true);
+        m_creature->SetLevel(55); //else one hack
+        StartTimer = 2000;
+        Active = false;
+    }
+
+    uint32 StartTimer;
+    bool Active;
+
+    void Reset(){}
+    void AttackStart(Unit *) {}
+    void MoveInLineOfSight(Unit*) {}
+
+    void MovementInform(uint32 uiType, uint32 uiPointId)
+    {
+        if (uiType != POINT_MOTION_TYPE && uiPointId == 0)
+            return;
+
+            char * text = "The Eye of Acherus is in your control";
+            m_creature->MonsterTextEmote(text, m_creature->GetGUID(), true);
+            m_creature->CastSpell(m_creature, 51890, true);
+    }
+
+    void UpdateAI(const uint32 uiDiff)
+    {
+        if(m_creature->isCharmed())
+        {
+            if (StartTimer < uiDiff && !Active)
+            {
+                m_creature->CastSpell(m_creature, 51892, true);
+                char * text = "The Eye of Acherus launches towards its destination";
+                m_creature->MonsterTextEmote(text, m_creature->GetGUID(), true);
+                m_creature->SetSpeedRate(MOVE_FLIGHT, 6.4f,true);
+                m_creature->GetMotionMaster()->MovePoint(0, 1711.0f, -5820.0f, 147.0f);
+                Active = true;
+            }
+            else StartTimer -= uiDiff;
+        }
+        else
+        {
+            m_creature->CleanupsBeforeDelete();
+            m_creature->AddObjectToRemoveList();
+        }
+    }
+};
+
+CreatureAI* GetAI_npc_eye_of_acherus(Creature* pCreature)
+{
+    return new npc_eye_of_acherusAI(pCreature);
+}
+
+/*######
+## go_eye_of_acherus
+######*/
+
+bool GOHello_go_eye_of_acherus(Player *player, GameObject* _GO)
+{
+    if (player->GetQuestStatus(12641) == QUEST_STATUS_INCOMPLETE)
+     player->CastSpell(player, 51852, false);
+
+    return true;
+}
+
   void AddSC_ebon_hold()
   {
       Script *newscript;
@@ -1136,4 +1207,14 @@
       newscript->Name = "go_acherus_soul_prison";
       newscript->pGOHello = &GOHello_go_acherus_soul_prison;
       newscript->RegisterSelf();
+
+    newscript = new Script;
+    newscript->Name = "npc_eye_of_acherus";
+    newscript->GetAI = &GetAI_npc_eye_of_acherus;
+    newscript->RegisterSelf();
+
+    newscript = new Script;
+    newscript->Name = "go_eye_of_acherus";
+    newscript->pGOHello = &GOHello_go_eye_of_acherus;
+    newscript->RegisterSelf();
   }
Сообщение # 2 отредактировано AlO - Воскресенье, 18.07.2010, 21:29
САХАЛИН
Центурион
Патчик не палит, на сколько я понимаю определение для m_spellProto->Id уехало из начала файла SpellAuras.cpp в почти самый конец, пытался решить эту проблему, но не понял как определяется m_spellProto->Id, а на угад не катит даж не пробовал. Так вот ребята прозьба помоч с этим патчиком, а точнее прошу помоч с этим куском патча:

Code
@@ -8348,6 +8348,14 @@ void Aura::HandlePhase(bool apply, bool Real)  
        }  
       
        // no-phase is also phase state so same code for apply and remove  
+    uint32 phase;  
+  
+    // i think phase mask should be added to current mask, NOT overwrite it  
+    // at least for this spell  
+    if (m_spellProto->Id == 51852)  
+        phase = apply ? (target->GetPhaseMask() | GetMiscValue()) : (target->GetPhaseMask() & ~GetMiscValue());  
+    else  
+        phase = apply ? GetMiscValue() : PHASEMASK_NORMAL;  
       
        // phase auras normally not expected at BG but anyway better check  
        if(target->GetTypeId() == TYPEID_PLAYER)


Ой ща по саням дам !
http://wow.grin.by
Сообщение # 3 написано 10.09.2010 в 18:59
NameNot
1
САХАЛИН, Какие ошибки при компиляции?
Сообщение # 4 написано 10.09.2010 в 19:37
lanc
The Hurt Locker
САХАЛИН, я себе поставил патч с гетмангоса стандартный + чуть подкоректировал патч на сд2 квест пашет идеально просто

а нащет m_spellproto его уже давно нет меняйте на GetSpellProto()

Сообщение # 5 отредактировано lanc - Пятница, 10.09.2010, 20:19
САХАЛИН
Центурион
lanc, ещё вопрос, правда не по теме, кароч я не понимаю как тут искать патчи и даж куда заходить, не мог бы объяснить в кратце?


Ой ща по саням дам !
http://wow.grin.by
Сообщение # 6 написано 11.09.2010 в 00:14
lanc
The Hurt Locker
на форум там либо в моды либо в генеральную дискусию либо в патчи на расмотрении и т.п. вобщем поиск есть разберетесь
Сообщение # 7 написано 11.09.2010 в 11:49
ph3n
Developer
Данная тема была перемещена из раздела Патчи в ядро MaNGOS.
Причина перемещения: устарело

Переместил: ph3n.
Сообщение # 8 написано 14.10.2012 в 13:33
  • Страница 1 из 1
  • 1
Поиск: