MAGE : MIRROR IMAGE AI
Bug Fix : Mirror Will Not Break Crowd Control
misal yg ditarget mage atau creature/player lain dalam kondisi ter CC(poly/hex/fear dll), maka Mirror akan berhenti
Problem : NEED to PORTING CODE from MANGOS to TRINITYCORE
Original TrinityCore Code
src/scripts/world/npcs_special.cpp
start at lines 1747
Mangos Code :Code:struct TRINITY_DLL_DECL npc_mirror_image : CasterAI { npc_mirror_image(Creature *c) : CasterAI(c) {} void InitializeAI() { CasterAI::InitializeAI(); Unit * owner = me->GetOwner(); if (!owner) return; // Inherit Master's Threat List (not yet implemented) owner->CastSpell((Unit*)NULL, 58838, true); // here mirror image casts on summoner spell (not present in client dbc) 49866 // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?) // Clone Me! owner->CastSpell(me, 45204, false); } // Do not reload Creature templates on evade mode enter - prevent visual lost void EnterEvadeMode() { if (me->IsInEvadeMode() || !me->isAlive()) return; Unit *owner = me->GetCharmerOrOwner(); me->CombatStop(true); if (owner && !me->hasUnitState(UNIT_STAT_FOLLOW)) { me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, m_creature->GetFollowAngle(), MOTION_SLOT_ACTIVE); } } };
src/bindings/ScriptDev2/scripts/world/npcs_special.cpp
Code:/*######## # mob_mirror_image AI #########*/ enum MirrorImage { SPELL_FROSTBOLT = 59638, SPELL_FIREBLAST = 59637 }; struct MANGOS_DLL_DECL mob_mirror_imageAI : public ScriptedAI { mob_mirror_imageAI(Creature* pCreature) : ScriptedAI(pCreature) { bLocked = false; Reset(); } uint64 m_uiCreatorGUID; uint32 m_uiFrostboltTimer; uint32 m_uiFireBlastTimer; float fDist; float fAngle; bool bLocked; void Reset() { m_uiFrostboltTimer = urand(500, 1500); m_uiFireBlastTimer = urand(4500, 6000); } void UpdateAI(const uint32 uiDiff) { if (!bLocked) { m_uiCreatorGUID = m_creature->GetCreatorGUID(); if (Player* pOwner = (Player*)Unit::GetUnit(*m_creature, m_uiCreatorGUID)) { fDist = m_creature->GetDistance(pOwner); fAngle = m_creature->GetAngle(pOwner); } bLocked = true; } Player* pOwner = (Player*)Unit::GetUnit(*m_creature, m_uiCreatorGUID); if (!pOwner || !pOwner->IsInWorld()) { m_creature->ForcedDespawn(); return; } uint64 targetGUID = 0; if (Spell* pSpell = pOwner->GetCurrentSpell(CURRENT_GENERIC_SPELL)) targetGUID = pSpell->m_targets.getUnitTargetGUID(); else if (pOwner->getVictim()) targetGUID = pOwner->getVictim()->GetGUID(); Unit* pTarget = Unit::GetUnit(*m_creature, targetGUID); if (!pTarget || !m_creature->CanInitiateAttack() || !pTarget->isTargetableForAttack() || !m_creature->IsHostileTo(pTarget) || !pTarget->isInAccessablePlaceFor(m_creature)) { if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE) { m_creature->InterruptNonMeleeSpells(false); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveFollow(pOwner, fDist, fAngle); } return; } if (m_uiFrostboltTimer <= uiDiff) { m_creature->CastSpell(pTarget, SPELL_FROSTBOLT, false, NULL, NULL, pOwner->GetGUID()); m_uiFrostboltTimer = urand(3000, 4500); } else m_uiFrostboltTimer -= uiDiff; if (m_uiFireBlastTimer <= uiDiff) { m_creature->CastSpell(pTarget, SPELL_FIREBLAST, false, NULL, NULL, pOwner->GetGUID()); m_uiFireBlastTimer = urand(9000, 12000); } else m_uiFireBlastTimer -= uiDiff; } }; CreatureAI* GetAI_mob_mirror_image(Creature* pCreature) { return new mob_mirror_imageAI(pCreature); }
Betrayer ... !!! In Truth, it was I who was Betrayed ...!!!
The Following User Says Thank You to F1shF4c3 For This Useful Post: | ||
Thx buat semua bantuannya. Sorry thread nya rada terbengkalai, lagi download VISUAL STUDIO 2008 PROFESSIONAL. Soalnya TRINITY CORE revisi terbaru, bawa2 file yang cuma ada di PRO edition. Cape de.
Mana VS2008 PRO.iso nya gedenya 3GB, trus speedy nya lagi naik turun speed nya.
Yang gw soalnya VS C++ 2008 Express Edition.
Skali lagi thx buat yang uda bantu. Uda gw masukin di page ONE.
If mood>0 Then open=notepad+,sqlyog,chrome,dbceditor Else sleep EndIf
The Following 2 Users Say Thank You to heaven1st For This Useful Post: | ||
[FIX] Diminish Warrior Spell Reflect vs Player
sebenarnya dah ada revision 3770d2daaa sejak Feb, 2010. tapi entah mengapa di branch yg baru dilewati lagi. mungkin maintainer-nya miss.
revision 3770d2daaa
http://code.google.com/p/trinitycore...l?r=3770d2daaa
/src/game/Unit.cpp --> [di branch baru dipindah. mungkin karena itu pula, diff-nya gagal.]
diff code-nya :
nah di branch yg baru, kembali lagi ke code awal sebelum direvisi.Code:void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster,DiminishingLevels Level, int32 limitduration) { - if (duration == -1 || group == DIMINISHING_NONE || caster->IsFriendlyTo(this)) + if (duration == -1 || group == DIMINISHING_NONE || (caster->IsFriendlyTo(this) && caster != this)) return
Unit.cpp di Branch baru :
src/server/game/Entities/Unit/Unit.cpp --> posisi file di branch sekarang.
function Unit::ApplyDiminishingToDuration ada di line 12753
tinggal edit langsung atau merevisi diff path-nya trus di merge n compile.
Betrayer ... !!! In Truth, it was I who was Betrayed ...!!!
Perhatian
Buat yang talent/spell class masing2 pingin di fix (bukan berarti gw bisa bantu semuanya), bisa tolongin kolektifin bug/error nya di tempat masing2. Nanti tinggal kasih ke gw link ke post an kalian. Soalnya banyak banget page nya, jadi males ngecek satu2 apa aja yang masih bug ato yang uda fix.
Contoh thread/post yang bug nya dikolektifin : http://www.indogamers.com/showthread.php?t=297968
Buat gw itu sangat membantu jadi ga usa pusing2 ngetest 1 1 skillnya (pake 2 kompi di rumah).
Thanks in advance.
If mood>0 Then open=notepad+,sqlyog,chrome,dbceditor Else sleep EndIf
Request donk
Glyph of succubus sama sekali g ngilangin DOT di target
trus skill Ritual of doom dri jaman dolo kaga bener" tolong di fix
klo emang g bisa ndak apa" thank's
Anu tumpang nanya gan... kalo pet scaling tuh masuknya yang fix cuma bisa GM yah?
10. nambahin donk demoraralizing shout am piercing howl bs di COS am roque... -VVV
ini udah fix kok
11. tambahan sedikit.. Talent Protection : Gag Order : talent ini kalo di colok full bisa memberi status silence kepada musuh yang di attack nya.. -Gorfed
yg ini malah blom fix ga keluar debuff silence nya 3sec
@fishface , thx atas spellreflect fixnya , tapi emang sudah ada dari dulu dan emang gak benar.
berhubung saya gak admin , saya masukan fix saya sebagai unofficial fix.
yesterday 12/07/2010
Fix :
Minor Fix Ulduar, and reopened again
Today 13/07/2010
Fix :
Arena Unit Frame
Gag order
Spell Reflection
Vanish(probably)
Last edited by sunlounger; 13-07-10 at 08:49.
Religion is regarded by the common people as true, by the wise as false, and by the rulers as useful.
respond : fix barusan bikin skill priest Vampiric Embrace durasi tinggal 1 menit seharusnya 30 menit thx
iya..
Vam Embrace sekarang durasi ny eror..1 menit yg harus ny 30 menit
kak heaven request mark hunter dong.. knapa ya atack powernya dr jaman tbc gak jalan ? scriptnya emang crash ya ?
Today (15-07-2010)
- Fix Spell Reflection(again)
- Earthen Power
Religion is regarded by the common people as true, by the wise as false, and by the rulers as useful.
The Following User Says Thank You to sunlounger For This Useful Post: | ||
bisa minta tolong deep freeze mage bisa ngasi damage buat target yang immune stun kaga, thx before @_@
Share This Thread