Problem in source: Area attacks do not have any damage type in their attack void (by default they are all physical damage). because of this slight oversight, fire circle/pervade and other area attacks all calculate as PH dmg and therefor are vastly wrong (although using pervade on a tro is rather funny xD)
Steps to fix it:
Modify the attack void:
The original AreaTargets attack void will start something like this...
Code:
static void AreaTargets(COClient Client, int Distance, ref Dictionary<uint, int> Targets, Struct.CharSkill Spell)
Code:
static void AreaTargets(COClient Client, int Distance, ref Dictionary<uint, int> Targets, Struct.CharSkill Spell, int Type)
Look further down in that code and simply change it to have damage type.
Code:
int Damage = Calculation.Damage(Client.Char, AClient.Char, 2, Spell.ID, Spell.Level);
with...
Code:
int Damage = Calculation.Damage(Client.Char, AClient.Char, Type, Spell.ID, Spell.Level);
Modify the individual skills to conform to the new void:
Handler>Attack.cs contains the data for attack calculations.
In this case
Code:
case 3090:
case 1120:
{
#region FireCircle n Pervade
Dictionary<uint, int> Targets = new Dictionary<uint, int>();
AreaTargets(Client, Spell.Level + 10, ref Targets, Spell);
ConquerPacket.ToLocal(ConquerPacket.MagicAttack(Client.Char.ID, Spell.ID, Spell.Level, Targets, Client.Char.X, Client.Char.Y), Client.Char.X, Client.Char.Y, (int)Client.Char.Map, 0, 0);
break;
#endregion
}
In the end it will look something like this (yay copypaste?!)
Code:
case 3090:
case 1120:
{
#region FireCircle n Pervade
Dictionary<uint, int> Targets = new Dictionary<uint, int>();
AreaTargets(Client, Spell.Level + 10, ref Targets, Spell, 21);
ConquerPacket.ToLocal(ConquerPacket.MagicAttack(Client.Char.ID, Spell.ID, Spell.Level, Targets, Client.Char.X, Client.Char.Y), Client.Char.X, Client.Char.Y, (int)Client.Char.Map, 0, 0);
break;
#endregion
}
And that's really all there is to it. you will need to modify every AreaTargets attack in the source by adding attack type to the end of the string (exactly like we did for fire circle/pervade)
Hope that helps some people. Not super complicated and not a ton of people using the 1.0 source but still somewhat useful to know how to do.
[Minor Note]
Attack types: 2 = Physical, 21 = Magical, 25 = bow.
Mana cost for spells are stored in Calculation.cs
Eg for fire circle
Code:
case 1120://FireCircle - MP Check
{
int ManaCost = 0;
if (MagicLevel == 0)
ManaCost = 150;
else if (MagicLevel == 1)
ManaCost = 170;
else if (MagicLevel == 2)
ManaCost = 190;
else if (MagicLevel == 3)
ManaCost = 210;
if (Client.Char.CurrentMP < ManaCost)
{
return false;
}
else
{
Client.Char.CurrentMP -= ManaCost;
Client.SendData(ConquerPacket.Status(Client, Client.Char.CurrentMP, Struct.StatusTypes.Mp));
return true;
}
}
Also in calculation.cs is the code controlling magic dmg boost from spells. (higher lvl nado does more dmg etc)
Eg: Fire circle
Code:
case 1120: //Fire Circle
{
if (Level == 0)
return 540;
if (Level == 1)
return 650;
if (Level == 2)
return 720;
if (Level == 3)
return 770;
break;
}
Again, hope it helps some.






