Deadlycrow's fix worked - with a very small revision.
All attacks miss when adding a new
unsigned int to chartype.h
(I don't understand why
)
Maybe today we can omit adding a new unsigned int tho.
Since this skill needs a target to execute - we can use
unsigned int atktarget; for targeted AOE case.
(Or am I just missing something?
I don't really know what exactly I'm doing here, I just edited and
worked on what makes sense to a non programmer like myself. So anyway...)
The Original thread of the fix is here if you want to try it (it might work for you.)
http://forum.dev-osrose.com/viewtopic.php?f=30&t=5325Since an unsigned int (the
atktarget;) already exist in chartype.h we can
proceed to charfunction.ccp to find this:
-
- case AOE_TARGET:
- {
- //LMA 2008/09/02: new version, the target is a zone, not a monster... so we stick with aoedestiny ;)
-
- RESETPACKET( pak, 0x7b4 );
- ADDWORD ( pak, clientid );
- ADDWORD ( pak, skillid );
- ADDFLOAT ( pak, Position->aoedestiny.x*100 );
- ADDFLOAT ( pak, Position->aoedestiny.y*100 );
- Battle->atktype = action;
- Battle->skillid = skillid;
- Battle->target = 0;
- Battle->skilltarget = 0;
- Position->destiny = Position->aoedestiny;
- Position->lastMoveTime = clock( );
- Log(MSG_INFO,"StartAction, AOE_TARGET, target (%.2f,%.2f)",Position->aoedestiny.x,Position->aoedestiny.y);
- }
- break;
-
and change it to this:
(notice Battle->target = 0; is now Battle->target = Battle->atktarget;)
-
- case AOE_TARGET:
- {
- //LMA 2008/09/02: new version, the target is a zone, not a monster... so we stick with aoedestiny ;)
- RESETPACKET( pak, 0x7b4 );
- ADDWORD ( pak, clientid );
- ADDWORD ( pak, skillid );
- ADDFLOAT ( pak, Position->aoedestiny.x*100 );
- ADDFLOAT ( pak, Position->aoedestiny.y*100 );
- Battle->atktype = action;
- Battle->skillid = skillid;
- Battle->skilltarget = 0;
- Battle->target = Battle->atktarget;
- Position->destiny = Position->aoedestiny;
- Position->lastMoveTime = clock( );
- Log(MSG_INFO,"StartAction, AOE_TARGET, target (%.2f,%.2f)",Position->aoedestiny.x,Position->aoedestiny.y);
- }
- break;
-
the case will now execute on the players' targeted mob - it works fine inside as the skill is declared with a radius in stb.. so instead of targeting the area/zone - the new target is the selected monster.
and then:
deadlycrow's additional fix is moving case AOE_TARGET;
find this:
- bool CCharacter::IsOnBattle( )
- {
- //Bonfire don't attack...
- if(Battle->atktype==0) return false;
- switch(Battle->atktype)
- {
- case NORMAL_ATTACK:
- {
- if(Battle->atktarget!=0) return true;
- }
- break;
- case SKILL_ATTACK:
- case AOE_TARGET:
- {
- if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case SKILL_BUFF:
- {
- if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case SUMMON_BUFF:
- {
- if(Battle->bufftarget!=0&&Battle->skillid!=0) return true;
- }
- break;
- case MONSTER_SKILL_BUFF:
- {
- if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case MONSTER_SKILL_ATTACK:
- {
- if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case MONSTER_BUFF_SELF:
- case SKILL_AOE:
- case SKILL_SELF:
- case BUFF_SELF:
- case BUFF_AOE:
-
- {
- if(Battle->skillid!=0) return true;
- }
- break;
- case STAY_STILL_ATTACK:
- {
- //LMA: Very special case where the monster don't really attack (mc)
- return true;
- }
- default: return false;
- }
- }
replace with this:
-
- bool CCharacter::IsOnBattle( )
- {
- //Bonfire don't attack...
- if(Battle->atktype==0) return false;
- switch(Battle->atktype)
- {
- case NORMAL_ATTACK:
- {
- if(Battle->atktarget!=0) return true;
- }
- break;
- case SKILL_ATTACK:
-
- {
- if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case SKILL_BUFF:
- {
- if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case SUMMON_BUFF:
- {
- if(Battle->bufftarget!=0&&Battle->skillid!=0) return true;
- }
- break;
- case MONSTER_SKILL_BUFF:
- {
- if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case MONSTER_SKILL_ATTACK:
- {
- if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
- }
- break;
- case MONSTER_BUFF_SELF:
- case SKILL_AOE:
- case SKILL_SELF:
- case BUFF_SELF:
- case BUFF_AOE:
- case AOE_TARGET:
- {
- if(Battle->skillid!=0) return true;
- }
- break;
- case STAY_STILL_ATTACK:
- {
- //LMA: Very special case where the monster don't really attack (mc)
- return true;
- }
- default: return false;
- }
- }
-
Thanks. Hope this works for all using the rev4.