武器方面的补丁
**** Hidden Message ***** Help Search Members CalendarSearch this forum only?
More Search Options [X]My Assistant
Loading. Please Wait...
Site Message (Message will auto close in 2 seconds)
Logged in as: micckkk ( Log Out )
My Controls · View New Posts · My Assistant · My Friends · 0 New Messages
Ascent Forums > Ascent Emulator > Code Discussion > Patch Submission
Windfury Weapon mostly fixed, still problems with dual wield Options Track this topic
Email this topic
Print this topic
Download this topic
Subscribe to this forum
Display Modes
Switch to: Outline
Standard
Switch to: Linear+
Baldur
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 08:44 PM Post #1
Advanced Member
Group: Members
Posts: 47
Joined: 23-December 07
Member No.: 24,249
fixed:
GetShamanMeleeDamage can diferenciate between main hand and off hand
Windfury always hits
Windfury hits with correct damage (old: windfury damage + standard damage)
Windfury can crit (my fault)
required / how do I do that / not possible with current spell system ??
HandleProc must be able to diferenciate between main hand and off hand
testing required:
is the damage for only main weapon correct now?
"temp exploit" avoided:
slow main hand, fast off hand will not work! windfury will always use lowest damage
CODE
Index: extras/shaman_todo.txt===================================================================--- extras/shaman_todo.txt (revision 3613)+++ extras/shaman_todo.txt (working copy)@@ -19,6 +19,14 @@ Flametongue Weapon and Frostbrand Weapon by $s2%. Windfury Weapon effect by $s3% +/*+Rockbiter - working - untested ?!+Windfury Weapon - working for main hand - untested+Bug: After every? equipment change one has to recast enchantmeants+(Details: Windfury on both weapons, removed off hand, windfury never triggered on main hand)+*/++ [08:51:59] Spell::cast 3050, Unit: 7 [08:51:59] WORLD: Spell effect id = 49, damage = 0 [08:51:59] Unhandled spell effect 49 in spell 3050.Index: src/ascent-world/Player.cpp===================================================================--- src/ascent-world/Player.cpp (revision 3613)+++ src/ascent-world/Player.cpp (working copy)@@ -8635,59 +8635,76 @@ } -uint32 Player::GetMainMeleeDamage(uint32 AP_owerride)+uint32 Player::GetShamanMeleeDamage(uint32 AP_override, bool mainHand) {- float min_dmg,max_dmg;- float delta;- float r;- int ss = GetShapeShift();-/////////////////MAIN HAND- float ap_bonus;- if(AP_owerride) - ap_bonus = AP_owerride/14000.0f;- else - ap_bonus = GetAP()/14000.0f;- delta = (float)GetUInt32Value( PLAYER_FIELD_MOD_DAMAGE_DONE_POS ) - (float)GetUInt32Value( PLAYER_FIELD_MOD_DAMAGE_DONE_NEG );- if(IsInFeralForm())+ // Currently this is for windfury only+ if( disarmed ) return 0;++ float weaponModifier = 1.0f;+ float ap_bonus = (float)AP_override / 14000.0f;++ float spellEffects = (float) GetUInt32Value( PLAYER_FIELD_MOD_DAMAGE_DONE_POS )+ -(float) GetUInt32Value( PLAYER_FIELD_MOD_DAMAGE_DONE_NEG );+++ Item* weapon = NULL;++ if( mainHand ) {- uint32 lev = getLevel();- if(ss == FORM_CAT)- r = lev + delta + ap_bonus * 1000.0f;- else- r = lev + delta + ap_bonus * 2500.0f;- min_dmg = r * 0.9f;- max_dmg = r * 1.1f;- return float2int32(std::max((min_dmg + max_dmg)/2.0f,0.0f));+ /*+ main hand formula in CalcDamage()+ ((Base0 + spellEffects + ap_bonus·Delay)·weaponModifier + (Base1 + spellEffects + ap_bonus·Delay)·weaponModifier)/2+ + Derive tells me this is the same as:+ weaponModifier·(Base0 + Base1 + 2·(Delay·ap_bonus + spellEffects))/2+ */++ weapon = GetItemInterface()->GetInventoryItem( EQUIPMENT_SLOT_MAINHAND ); }-//////no druid ss - uint32 speed=2000;- Item *it = GetItemInterface()->GetInventoryItem(EQUIPMENT_SLOT_MAINHAND);- if(!disarmed)- { - if(it)- speed = it->GetProto()->Delay;+ else+ {+ /*+ off hand forumla in CalcDamage()+ ((Base0 + spellEffects + ap_bonus·Delay)·weaponModifier·offhand_dmg_mod + (Base1 + spellEffects + ap_bonus·Delay)·weaponModifier·offhand_dmg_mod)/2++ and again Derive:+ offhand_dmg_mod·weaponModifier·(Base0 + Base1 + 2·Delay·ap_bonus + 2·spellEffects)/2++ as you can see this part is the same on both:+ weaponModifier·(Base0 + Base1 + 2·(Delay·ap_bonus + spellEffects))/2++ so I just "hide" offhand_dmg_mod inside weaponModifier :-)+ */++ weapon = GetItemInterface()->GetInventoryItem( EQUIPMENT_SLOT_OFFHAND );++ // I hope this is correct+ weaponModifier *= offhand_dmg_mod; }- float bonus=ap_bonus*speed;- float tmp = 1;+ map<uint32, WeaponModifier>::iterator i; for(i = damagedone.begin();i!=damagedone.end();i++) { if((i->second.wclass == (uint32)-1) || //any weapon- (it && ((1 << it->GetProto()->SubClass) & i->second.subclass) )+ (weapon && ((1 << weapon->GetProto()->SubClass) & i->second.subclass) ) )- tmp+=i->second.value/100.0f;+ weaponModifier += i->second.value / 100.0f; }- - r = BaseDamage[0]+delta+bonus;- r *= tmp;- min_dmg = r * 0.9f;- r = BaseDamage[1]+delta+bonus;- r *= tmp;- max_dmg = r * 1.1f; - return float2int32(std::max((min_dmg + max_dmg)/2.0f,0.0f));++ // r = weaponModifier·(Base0 + Base1 + 2·(Delay·ap_bonus + spellEffects))/2+ int32 r = float2int32(+ weaponModifier * (BaseDamage[0] + BaseDamage[1] + 2.0f * ((float)weapon->GetProto()->Delay * ap_bonus + spellEffects)) / 2.0f );++ // right now I'm just happy windfury works at all+ // this is for someone else to fix. (Baldur)+ // sLog.outDebug("weapon mod %u not applied in GetShamanMeleeDamage. Someone might want to change this ",+ // GetUInt32Value( PLAYER_RATING_MODIFIER_MELEE_MAIN_HAND_SKILL ));++ return (uint32) ( r > 0 ? r : 0 ); } + void Player::EventPortToGM(Player *p) { SafeTeleport(p->GetMapId(),p->GetInstanceID(),p->GetPosition());Index: src/ascent-world/Player.h===================================================================--- src/ascent-world/Player.h (revision 3613)+++ src/ascent-world/Player.h (working copy)@@ -981,7 +981,7 @@ return ( s == 1 || s == 5 || s == 8 ); } void CalcDamage();- uint32 GetMainMeleeDamage(uint32 AP_owerride); //i need this for windfury+ uint32 GetShamanMeleeDamage(uint32 AP_override, bool offHand); // for windfury const uint64& GetSelection( ) const { return m_curSelection; } const uint64& GetTarget( ) const { return m_curTarget; }Index: src/ascent-world/Unit.cpp===================================================================--- src/ascent-world/Unit.cpp (revision 3613)+++ src/ascent-world/Unit.cpp (working copy)@@ -1173,7 +1173,8 @@ if( !(CastingSpell->c_is_flags & SPELL_FLAG_IS_DAMAGING)) //healing wave continue; }break;- //shaman - windfurry weapon+ //shaman - windfury weapon+ //spell spells correct please! it took me hours to find this code case 8232: case 8235: case 10486:@@ -1184,12 +1185,35 @@ continue; //!! The wierd thing is that we need the spell thet trigegred this enchant spell in order to output logs ..we are using oldspell info too //we have to recalc the value of this spell- SpellEntry *spellInfo = dbcSpell.LookupEntry(origId);- uint32 AP_owerride=GetAP() + spellInfo->EffectBasePoints[0]+1;- uint32 dmg = static_cast< Player* >( this )->GetMainMeleeDamage(AP_owerride); SpellEntry *sp_for_the_logs = dbcSpell.LookupEntry(spellId);- Strike( victim, MELEE, sp_for_the_logs, dmg, 0, 0, true, false );- Strike( victim, MELEE, sp_for_the_logs, dmg, 0, 0, true, false );++ uint32 dmg = static_cast< Player* >( this )+ ->GetShamanMeleeDamage( GetAP() + ospinfo->EffectBasePoints[0] + 1, true );++++ Item* offHandWeapon = static_cast< Player* >( this )->GetItemInterface()->GetInventoryItem( EQUIPMENT_SLOT_OFFHAND );+ if( offHandWeapon != NULL+ && offHandWeapon->GetProto() != NULL+ && offHandWeapon->GetProto()->Class == ITEM_CLASS_WEAPON )+ {+ // off hand equipped+ // we don't know whether main or offhand triggered windfury+ // avoid exploit (slow main, fast off hand) and use lowest possible damage+ // this will make double wilding useless, unless you use same weapon, sry :-(+ // (Baldur)+ // everyone is welcome to fix this + + uint32 dmgOff = static_cast< Player* >( this )+ ->GetShamanMeleeDamage( GetAP() + ospinfo->EffectBasePoints[0] + 1, false );++ if( dmgOff < dmg )+ dmg = dmgOff;+ }+++ Strike( victim, MELEE, sp_for_the_logs, 0, 0, dmg, true, true );+ Strike( victim, MELEE, sp_for_the_logs, 0, 0, dmg, true, true ); //nothing else to be done for this trigger continue; }break;@@ -2354,6 +2378,7 @@ dodge=parry=block=0.0f; } + if( IsPlayer() && static_cast< Player* >( this )->m_finishingmovesdodge && ability && ( ability->EffectPointsPerComboPoint[0] > 0 || ability->EffectPointsPerComboPoint[1] > 0 || ability->EffectPointsPerComboPoint[2] > 0 ) ) // SPELL: Surprise Attacks dodge = 0.0f; Index: src/ascent-world/World.cpp===================================================================--- src/ascent-world/World.cpp (revision 3613)+++ src/ascent-world/World.cpp (working copy)@@ -6904,21 +6904,21 @@ if( sp != NULL ) sp->procFlags = PROC_ON_CAST_SPELL; - //windfury weapon changes. Start to hate these day by day++ // windfury weapon EnchantEntry* Enchantment; Enchantment = dbcEnchant.LookupEntryForced( 283 ); if( Enchantment != NULL ) {- Enchantment->spell[0] = 33757; //this is actually good+ // Enchantment->spell[0] = 33757; //this is actually good sp = dbcSpell.LookupEntryForced( 33757 ); if( sp != NULL ) {- sp->EffectApplyAuraName[0] = 42; //who needs dummys anyway ?- sp->procFlags = PROC_ON_MELEE_ATTACK; //we do not need proc on spell - sp->EffectTriggerSpell[0] = 8232; //for the logs and rest- sp->procChance = 20;- sp->proc_interval = 3000;//http://www.wowwiki.com/Windfury_Weapon+ sp->EffectApplyAuraName[0] = 42;+ sp->procFlags = PROC_ON_MELEE_ATTACK; // why is ascent not using PROC_ON_PHYSICAL_ATTACK_VICTIM?+ sp->EffectTriggerSpell[0] = 8232; // fix dbc+ sp->proc_interval = 3000; // <a href="http://www.wowwiki.com/Windfury_Weapon" target="_blank">[url]http://www.wowwiki.com/Windfury_Weapon[/url]</a> sp->maxstack = 1; } }@@ -6930,11 +6930,10 @@ sp = dbcSpell.LookupEntryForced( 33756 ); if( sp != NULL ) {- sp->EffectApplyAuraName[0] = 42; //who needs dummys anyway ?- sp->procFlags = PROC_ON_MELEE_ATTACK; //we do not need proc on spell - sp->EffectTriggerSpell[0] = 8235; //for the logs and rest- sp->procChance = 20;- sp->proc_interval = 3000; //http://www.wowwiki.com/Windfury_Weapon+ sp->EffectApplyAuraName[0] = 42;+ sp->procFlags = PROC_ON_MELEE_ATTACK; // why is ascent not using PROC_ON_PHYSICAL_ATTACK_VICTIM?+ sp->EffectTriggerSpell[0] = 8235; // fix dbc+ sp->proc_interval = 3000; // <a href="http://www.wowwiki.com/Windfury_Weapon" target="_blank">[url]http://www.wowwiki.com/Windfury_Weapon[/url]</a> sp->maxstack = 1; } }@@ -6946,11 +6945,10 @@ sp = dbcSpell.LookupEntryForced( 33755 ); if( sp != NULL ) {- sp->EffectApplyAuraName[0] = 42; //who needs dummys anyway ?- sp->procFlags = PROC_ON_MELEE_ATTACK; //we do not need proc on spell - sp->EffectTriggerSpell[0] = 10486; //for the logs and rest- sp->procChance = 20;- sp->proc_interval = 3000;//http://www.wowwiki.com/Windfury_Weapon+ sp->EffectApplyAuraName[0] = 42;+ sp->procFlags = PROC_ON_MELEE_ATTACK; // why is ascent not using PROC_ON_PHYSICAL_ATTACK_VICTIM?+ sp->EffectTriggerSpell[0] = 10486; // fix dbc+ sp->proc_interval = 3000; // <a href="http://www.wowwiki.com/Windfury_Weapon" target="_blank">[url]http://www.wowwiki.com/Windfury_Weapon[/url]</a> sp->maxstack = 1; } }@@ -6962,11 +6960,10 @@ sp = dbcSpell.LookupEntryForced( 33754 ); if( sp != NULL ) {- sp->EffectApplyAuraName[0] = 42; //who needs dummys anyway ?- sp->procFlags = PROC_ON_MELEE_ATTACK; //we do not need proc on spell - sp->EffectTriggerSpell[0] = 16362; //for the logs and rest- sp->procChance = 20;- sp->proc_interval = 3000;//http://www.wowwiki.com/Windfury_Weapon+ sp->EffectApplyAuraName[0] = 42;+ sp->procFlags = PROC_ON_MELEE_ATTACK; // why is ascent not using PROC_ON_PHYSICAL_ATTACK_VICTIM?+ sp->EffectTriggerSpell[0] = 16362; // fix dbc+ sp->proc_interval = 3000; // <a href="http://www.wowwiki.com/Windfury_Weapon" target="_blank">[url]http://www.wowwiki.com/Windfury_Weapon[/url]</a> sp->maxstack = 1; } }@@ -6978,11 +6975,10 @@ sp = dbcSpell.LookupEntryForced( 33727 ); if( sp != NULL ) {- sp->EffectApplyAuraName[0] = 42; //who needs dummys anyway ?- sp->procFlags = PROC_ON_MELEE_ATTACK; //we do not need proc on spell - sp->EffectTriggerSpell[0] = 25505; //for the logs and rest- sp->procChance = 20;- sp->proc_interval = 3000;//http://www.wowwiki.com/Windfury_Weapon+ sp->EffectApplyAuraName[0] = 42;+ sp->procFlags = PROC_ON_MELEE_ATTACK; // why is ascent not using PROC_ON_PHYSICAL_ATTACK_VICTIM?+ sp->EffectTriggerSpell[0] = 25505; // fix dbc+ sp->proc_interval = 3000; // <a href="http://www.wowwiki.com/Windfury_Weapon" target="_blank">[url]http://www.wowwiki.com/Windfury_Weapon[/url]</a> sp->maxstack = 1; } }
I recommend using: [url]http://pastebin.ca/885345[/url]
yomoto
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 08:58 PM Post #2
Advanced Member
Group: Members
Posts: 40
Joined: 26-September 07
Member No.: 11,362
QUOTE
Windfury can't crit
windfury can crit on offi....
QUOTE
Windfury procs that crit will also trigger Flurry
source: wowwiki [url]http://www.wowwiki.com/Windfury_Weapon[/url]
yomoto
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 08:58 PM Post #3
Advanced Member
Group: Members
Posts: 40
Joined: 26-September 07
Member No.: 11,362
QUOTE
Windfury can't crit
windfury can crit on offi....
QUOTE
Windfury procs that crit will also trigger Flurry
source: wowwiki [url]http://www.wowwiki.com/Windfury_Weapon[/url]
yomoto
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 08:58 PM Post #4
Advanced Member
Group: Members
Posts: 40
Joined: 26-September 07
Member No.: 11,362
QUOTE
Windfury can't crit
windfury can crit on offi....
QUOTE
Windfury procs that crit will also trigger Flurry
source: wowwiki [url]http://www.wowwiki.com/Windfury_Weapon[/url]
yomoto
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 08:58 PM Post #5
Advanced Member
Group: Members
Posts: 40
Joined: 26-September 07
Member No.: 11,362
QUOTE
Windfury can't crit
windfury can crit on offi....
QUOTE
Windfury procs that crit will also trigger Flurry
source: wowwiki [url]http://www.wowwiki.com/Windfury_Weapon[/url]
delete this please >< freaking lag..
Baldur
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 09:07 PM Post #6
Advanced Member
Group: Members
Posts: 47
Joined: 23-December 07
Member No.: 24,249
damn you are right... one moment
Jeffie
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 09:15 PM Post #7
Advanced Member
Group: Members
Posts: 251
Joined: 31-August 07
From: Netherlands
Member No.: 7,063
CODE
+ uint32 spellEffects = GetUInt32Value( PLAYER_FIELD_MOD_DAMAGE_DONE_POS )
+ - GetUInt32Value( PLAYER_FIELD_MOD_DAMAGE_DONE_NEG );
You should cast these to floats during the calculation or you'll get weird stuff if NEG is higher than POS which caused the touch of weakness bug before.
Baldur
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 09:40 PM Post #8
Advanced Member
Group: Members
Posts: 47
Joined: 23-December 07
Member No.: 24,249
updated, included both fixes^^
Tudi
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 11:04 PM Post #9
Advanced Member
Group: Members
Posts: 861
Joined: 28-July 07
Member No.: 395
if solution would be good then it should be general and not only for shamans. I think offhand is already in the formula somewhere. Try unit::strike
Baldur
View Member Profile
Add as Friend
Send Message
Find Member's Topics
Find Member's Posts Jan 30 2008, 11:48 PM Post #10
Advanced Member
Group: Members
Posts: 47
Joined: 23-December 07
Member No.: 24,249
yeah i know strike, GetShamanMeleeDamage() is required because windfury adds extra attack power
the main hand / off hand appears to be a general bug that I am not going to fix ;-)
? Next Oldest · Patch Submission · Next Newest ?
1 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
1 Members: micckkk
Forum Home Search Help Community |-- Announcements |-- Introductions |-- General Discussion |-- Fun and Entertainment Ascent Emulator |-- Subversion Commits |-- Release/Milestone Announcements |-- Crash Reporting |-- Bug Reporting |-- Code Discussion |---- Patch Submission |------ Added Patches |-- Full User Code Submission Help and Support |-- Server Configuration & Administration Community Developments |-- Database |---- Releases |-- LUA Scripting |---- Releases |-- Module Authoring (c++) |---- Releases |-- Tools/Scripts/Packages QA Team |-- Bug Reporting |-- Improvements/Suggestions
Display Mode: Standard · Switch to: Linear+ · Switch to: Outline
Track this topic · Email this topic · Print this topic · Subscribe to this forum
IPB Classic Blue IP.Board Pro (Import) English Lo-Fi Version 0.0330 sec -- 10 queries GZIP Enabled
Time is now: 4th February 2008 - 07:24 AM
Powered By IP.Board 2.3.2 ? 2008 IPS, Inc. 难道是卡武器? 看看是什么呢。。。 什么乱七八糟的
这个呆B楼主抄袭来的东西永远也说不清楚他发的什么东西! 武器补丁是啥?能多很多模型?> 看一下
呵呵 有什么作用 [s:60] 干嘛的? 干嘛的? Windfury Weapon mostly fixed, still problems with dual wield Options Track this topic
Email this topic
Print this topic
Download this topic
Subscribe to this forum
Display Modes
Switch to: Outline
Standard
Switch to: Linear 是什么样的不定呢??????? 是有關武器哪方面的補丁? :) 顶一个,支持一个,学一个 什么用的?[s:17] 好像很多内容的样子[s:51] [s:51] kan kan kan kan kan kan kan kan [s:70] [s:70] [s:70] **** 作者被禁止或删除 内容自动屏蔽 **** 什么好东西呀 哈哈 我来咯 [s:65] 是什么东西?武器的补丁?学习学习 [s:70] [s:70] [s:70] 支持99GAME[s:62] 顶你个头。。。。。。。。。。。。。。
ging
[s:38] 顶! 顶! 顶! 顶! 顶! 顶! 顶! 顶! 顶! agsfffffffffghf [s:78] 看看不会是.. [s:61] [s:61] [s:61] DDDDDDDDDDDDDDDDDDDDDD 学习一下,[s:65]