ini gw **** amat ya maen pake2 ga dibaca
akwkawkawkaw
itu...
spell_warl_soul_swap() : SpellScriptLoader("spell_warl_soul_swap") { }
tapi di DBnya (86121, "spell_warlock_soul_swap"),
@_@ pantesan kgk keproc2
soul swapnya uda jalan, exhalenya uda bisa
tapi dotnya ga pindah ke momon yg 1 lg
ini ud gw edit yg di spell_warlock.cpp
--- SOUL SWAP ---
di database
Spoiler untuk database :
Code:
DELETE FROM spell_script_names WHERE spell_id IN (86121, 86211, 92795, 86213);
INSERT INTO spell_script_names (spell_id, ScriptName) VALUES
(86121, "spell_warlock_soul_swap"),
(86211, "spell_warlock_soul_swap_override"),
(92795, "spell_warlock_soul_swap_dot_marker"),
(86213, "spell_warlock_soul_swap_exhale");
baiklah... mau ngomong dari mana...
semua yg di sini sudah diapply ke server kita
namun dikarenakan si TrinityCore ganti function2 core mereka setiap minggu selama 4 bulan ini..
semua script2 ini menjadi tdk bisa dipakai lagi di Revisi yg semakin baru...
dikarenakan beberapa script yg berada di sini adalah custom script (disebut custom artinya bukan fresh dari TrinityCore), pada saat si TrintiyCore mengupdate semua script mereka berdasarkan kata2 yg baru mereka terapkan, kata2 yg dipakai oleh script2 di sini byk yg berubah sehingga tidak bisa dipakai lagi, karena sudah menggunakan kata yg berbeda... jadi jika ada yg ingin membantu selanjutnya mungkin hanya dalam bentuk SQL saja.. karena perubahan di SQL tidak terlalu drastis, hanya drastis di bagian smart_scripts saja
... ... ...
ada solusinya?
resillience masih error?
ini uda diapply dari 2 bulan lalu ternyata...
Originally Posted by Achernar_Altair
Description : good bye bug abuser, no more Bloodthirsty user rusuh2 berasa dewa di hit damage masuk tinggal 1/4 apa cobak, with this fix, combat rating formula udah difix jadi formula Cata, bukan formula Wotlk sperti skarang
Code : spertinya this code goes to /src/server/game/Entities/Unit/Unit.cpp, not really sure karena g dikasih penjelasan
Spoiler untuk C++ :
Code:
From 732d4af506bdddf0bad638b2737517bf5dc9502c Mon Sep 17 00:00:00 2001
From: Northstrider <[email protected]>
Date: Wed, 6 Feb 2013 19:13:31 +0100
Subject: [PATCH] Core/Units: updated combat damage reduction to cataclysm.
this will fix the relisience damage bug.
---
src/server/game/Entities/Unit/Unit.cpp | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 37fbf93..17516d7 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -15741,20 +15741,25 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
float Unit::GetCombatRatingReduction(CombatRating cr) const
{
- if (Player const* player = ToPlayer())
- return player->GetRatingBonusValue(cr);
- // Player's pet get resilience from owner
- else if (isPet() && GetOwner())
- if (Player* owner = GetOwner()->ToPlayer())
- return owner->GetRatingBonusValue(cr);
+ if (GetTypeId() == TYPEID_PLAYER)
+ return ((Player const*)this)->GetRatingBonusValue(cr);
+ else if (((Creature const*)this)->isPet())
+ {
+ // Player's pet get resilience from owner
+ if (Unit* owner = GetOwner())
+ if (owner->GetTypeId() == TYPEID_PLAYER)
+ return ((Player*)owner)->GetRatingBonusValue(cr);
+ }
return 0.0f;
}
uint32 Unit::GetCombatRatingDamageReduction(CombatRating cr, float rate, float cap, uint32 damage) const
{
- float percent = std::min(GetCombatRatingReduction(cr) * rate, cap);
- return CalculatePct(damage, percent);
+ float percent = GetCombatRatingReduction(cr) * rate;
+ if (percent > cap)
+ percent = cap;
+ return uint32 (percent * damage / 100.0f);
}
uint32 Unit::GetModelForForm(ShapeshiftForm form) const
--
1.7.10.msysgit.1
Status : jelas blom saya test sendiri
klo gw liat di scriptny, resi masih ngurangin crit damage (padahal di cata ud gk ada, tp di ampm masih ad),, terus formula resi brubah di cata sejak patch 4.1,, sdgkn di ampm masih make formula wotlk,,
jd ane buat script sendiri,,
Spoiler untuk ngilangin reduce crit damage :
/src/server/game/Entities/Unit/Unit.cpp
Spoiler untuk unit.cpp :
Spoiler untuk 1 :
Code:
void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType, bool crit)
{
if (damage < 0)
return;
Unit* victim = damageInfo->target;
if (!victim || !victim->IsAlive())
return;
SpellSchoolMask damageSchoolMask = SpellSchoolMask(damageInfo->schoolMask);
if (IsDamageReducedByArmor(damageSchoolMask, spellInfo))
damage = CalcArmorReducedDamage(victim, damage, spellInfo, attackType);
bool blocked = false;
// Per-school calc
switch (spellInfo->DmgClass)
{
// Melee and Ranged Spells
case SPELL_DAMAGE_CLASS_RANGED:
case SPELL_DAMAGE_CLASS_MELEE:
{
// Physical Damage
if (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
{
// Get blocked status
blocked = isSpellBlocked(victim, spellInfo, attackType);
}
if (crit)
{
damageInfo->HitInfo |= SPELL_HIT_TYPE_CRIT;
// Calculate crit bonus
uint32 crit_bonus = damage;
// Apply crit_damage bonus for melee spells
if (Player* modOwner = GetSpellModOwner())
modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_CRIT_DAMAGE_BONUS, crit_bonus);
damage += crit_bonus;
// Apply SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE or SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE
float critPctDamageMod = 0.0f;
if (attackType == RANGED_ATTACK)
critPctDamageMod += victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE);
else
critPctDamageMod += victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE);
// Increase crit damage from SPELL_AURA_MOD_CRIT_DAMAGE_BONUS
critPctDamageMod += (GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_CRIT_DAMAGE_BONUS, spellInfo->GetSchoolMask()) - 1.0f) * 100;
if (critPctDamageMod != 0)
AddPct(damage, critPctDamageMod);
}
// Spell weapon based damage CAN BE crit & blocked at same time
if (blocked)
{
// double blocked amount if block is critical
uint32 value = victim->GetBlockPercent();
if (victim->isBlockCritical())
value *= 2; // double blocked percent
damageInfo->blocked = CalculatePct(damage, value);
damage -= damageInfo->blocked;
}
- ApplyResilience(victim, &damage, crit);
+ ApplyResilience(victim, &damage);
break;
}
// Magical Attacks
case SPELL_DAMAGE_CLASS_NONE:
case SPELL_DAMAGE_CLASS_MAGIC:
{
// If crit add critical bonus
if (crit)
{
damageInfo->HitInfo |= SPELL_HIT_TYPE_CRIT;
damage = SpellCriticalDamageBonus(spellInfo, damage, victim);
}
- ApplyResilience(victim, &damage, crit);
+ ApplyResilience(victim, &damage);
break;
}
default:
break;
}
// Script Hook For CalculateSpellDamageTaken -- Allow scripts to change the Damage post class mitigation calculations
sScriptMgr->ModifySpellDamageTaken(damageInfo->target, damageInfo->attacker, damage);
// Calculate absorb resist
if (damage > 0)
{
CalcAbsorbResist(victim, damageSchoolMask, SPELL_DIRECT_DAMAGE, damage, &damageInfo->absorb, &damageInfo->resist, spellInfo);
damage -= damageInfo->absorb + damageInfo->resist;
}
else
damage = 0;
damageInfo->damage = damage;
}
-void Unit::ApplyResilience(Unit const* victim, int32* damage, bool isCrit) const
+void Unit::ApplyResilience(Unit const* victim, int32* damage) const
{
// player mounted on multi-passenger mount is also classified as vehicle
if (IsVehicle() || (victim->IsVehicle() && victim->GetTypeId() != TYPEID_PLAYER))
return;
// Don't consider resilience if not in PvP - player or pet
if (!GetCharmerOrOwnerPlayerOrPlayerItself())
return;
Unit const* target = NULL;
if (victim->GetTypeId() == TYPEID_PLAYER)
target = victim;
else if (victim->GetTypeId() == TYPEID_UNIT && victim->GetOwner() && victim->GetOwner()->GetTypeId() == TYPEID_PLAYER)
target = victim->GetOwner();
if (!target)
return;
- if (isCrit)
- *damage -= target->GetCritDamageReduction(*damage);
+
*damage -= target->GetDamageReduction(*damage);
}
Description : good bye bug abuser, no more Bloodthirsty user rusuh2 berasa dewa di hit damage masuk tinggal 1/4 apa cobak, with this fix, combat rating formula udah difix jadi formula Cata, bukan formula Wotlk sperti skarang
Code : spertinya this code goes to /src/server/game/Entities/Unit/Unit.cpp, not really sure karena g dikasih penjelasan
Spoiler untuk C++ :
Code:
From 732d4af506bdddf0bad638b2737517bf5dc9502c Mon Sep 17 00:00:00 2001
From: Northstrider <[email protected]>
Date: Wed, 6 Feb 2013 19:13:31 +0100
Subject: [PATCH] Core/Units: updated combat damage reduction to cataclysm.
this will fix the relisience damage bug.
---
src/server/game/Entities/Unit/Unit.cpp | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 37fbf93..17516d7 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -15741,20 +15741,25 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
float Unit::GetCombatRatingReduction(CombatRating cr) const
{
- if (Player const* player = ToPlayer())
- return player->GetRatingBonusValue(cr);
- // Player's pet get resilience from owner
- else if (isPet() && GetOwner())
- if (Player* owner = GetOwner()->ToPlayer())
- return owner->GetRatingBonusValue(cr);
+ if (GetTypeId() == TYPEID_PLAYER)
+ return ((Player const*)this)->GetRatingBonusValue(cr);
+ else if (((Creature const*)this)->isPet())
+ {
+ // Player's pet get resilience from owner
+ if (Unit* owner = GetOwner())
+ if (owner->GetTypeId() == TYPEID_PLAYER)
+ return ((Player*)owner)->GetRatingBonusValue(cr);
+ }
return 0.0f;
}
uint32 Unit::GetCombatRatingDamageReduction(CombatRating cr, float rate, float cap, uint32 damage) const
{
- float percent = std::min(GetCombatRatingReduction(cr) * rate, cap);
- return CalculatePct(damage, percent);
+ float percent = GetCombatRatingReduction(cr) * rate;
+ if (percent > cap)
+ percent = cap;
+ return uint32 (percent * damage / 100.0f);
}
uint32 Unit::GetModelForForm(ShapeshiftForm form) const
--
1.7.10.msysgit.1
Status : jelas blom saya test sendiri
Spoiler untuk source formula :
Prior to Patch 4.1, Resilience followed a linear return. Where y represented the damage reduction percentage, and x represented the amount of resilience, the linear formulas was as followed:
Code:
y = 0.01050120510299x + 0.000605956904
For example, damage was reduced by 15.75% when 1500 resilience was equipped:
Share This Thread