- Joined
- Sep 17, 2013
- Messages
- 433
- Reaction score
- 120
Hello , I've written a little source for SD to be AOE and its works well but there is a problem.
When A cjb attack a mob also it can hit the nearly chars even if there is no mask up.
In the war I can hit my guild mates when i use SD on the enemy .
Here is the source maybe someone correct it for me? if you got my point of the problem.
ahh ye , Special thaks to @Darn @Bloodx for helping me with my questions.
Here is the sources.
When A cjb attack a mob also it can hit the nearly chars even if there is no mask up.
In the war I can hit my guild mates when i use SD on the enemy .
Here is the source maybe someone correct it for me? if you got my point of the problem.
ahh ye , Special thaks to @Darn @Bloodx for helping me with my questions.
Here is the sources.
void __fastcall SoulDestruction(void *pSkill, void *pPlayer, int pPacket, int pPos){ ISkill ISkill(pSkill); int nSkillGrade = ISkill.GetGrade(); if (!nSkillGrade) return; IChar IPlayer(pPlayer); int nTargetID = 0; char bType = 0; void *pTarget = 0; CPacket::Read((char*)pPacket, (char*)pPos, "bd", &bType, &nTargetID); int nMana = ISkill.DecreaseMana(); if (bType == 0 && nTargetID) pTarget = CPlayer::FindPlayer(nTargetID); if (bType == 1 && nTargetID) pTarget = CMonster::FindMonster(nTargetID); if (bType >= 2) return; IChar ITarget(pTarget); if (pTarget && ITarget.IsValid() && IPlayer.IsValid() && nTargetID != IPlayer.GetID()) { if (IPlayer.GetCurMp() < nMana) return; if (!IPlayer.IsInRange(ITarget,300)) return; IPlayer.SetDirection(ITarget); (*(void (__thiscall **)(int, int))(*(DWORD*)ITarget.GetOffset() + 80))((int)ITarget.GetOffset(), (int)IPlayer.GetOffset()); int GetWisdom = CChar::GetWis((int)IPlayer.GetOffset()); int nDmg = ((GetWisdom * ISkill.GetGrade() + CTools::Rate(MSDMin,MSDMax)) * IPlayer.GetMagic() / 500) * MSDMul; if (ITarget.GetType() == 0) nDmg = (nDmg * MSDReduce) / 100; IPlayer.OktayDamageSingle(ITarget,nDmg,40); IPlayer.DecreaseMana(nMana); }}
Last edited: