Author | Message | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ![]() designz posted: (2nd Mar 2011 10:33 pm) replace the void map atatck spell with this void Map::AttackSpell(Character *from, int spellid, int targetid)
{ ESF_Data *spell = this ->world->esf->Get(spellid);
if (!spell) return ;
if ( this ->pk || ( static_cast < int >( this ->world->config[ "GlobalPK" ]) && ! this ->world->PKExcept( this ->id)))
{
if ( this ->AttackPKSpell(from, spellid,
targetid))
{
return ;
}
}
UTIL_PTR_LIST_FOREACH( this ->characters, Character, character)
{
UTIL_PTR_VECTOR_FOREACH( this ->npcs, NPC, npc)
{
if (from->clas == 9)
{
if ((npc->pet || npc->Data()->type == ENF::Pet ||
npc->Data()->type == ENF::Unknown3 || npc->Data()->type == ENF::Unknown4 || npc->Data()->type == ENF::Passive || npc->Data()->type == ENF::Aggressive || from->admin > static_cast < int >( this ->world->admin_config[ "killnpcs" ]))
&& npc->alive)
{
int amount = util:: rand (spell->mindam, spell->maxdam);
//int amount = util::rand(from->mindam + 0, from->maxdam +
0);
npc->SpellDamage(from, amount, spellid, targetid);
}
}
else if (from->clas != 9)
{
if ((npc->pet || npc->Data()->type == ENF::Pet || npc->Data()->type ==
ENF::Unknown3 || npc->Data()->type == ENF::Unknown4 || npc->Data()->type == ENF::Passive || npc->Data()->type == ENF::Aggressive || from->admin > static_cast < int >( this ->world->admin_config[ "killnpcs" ]))
&& npc->alive && npc->index == targetid)
{
int amount =
util:: rand (spell->mindam , spell->maxdam);
//int amount = util::rand(from->mindam + 0,
from->maxdam + 0);
npc->SpellDamage(from, amount, spellid,
targetid);
return ;
}
}
}
}
}
|
| ![]() ok i got no errors but when i log on the maps are all messed up
|
| ![]() designz posted: (2nd Mar 2011 10:47 pm) Well that probly doesnt have anything to do with this but first try a new character or account. Then if thats not it make sure your pubs arnt currupt.
|
| ![]() i think it might be with my edit pub bcuz when i switch the unke to 1 or 2 and i restart the server the maps are messed up but when i replace the pub with the old one its fine and i tryed switching the unke to 0 and tht didnt work edit:im using edit but 3.00 btw
|
| ![]() designz posted: (2nd Mar 2011 10:54 pm) try editing with this
|
| ![]() the pub editor works thx for tht but the aoe wont work still :/
|
| ![]() can you post your eodatta.cpp/hpp for me?
|
| ![]()
|
| ![]() Well those are correct. That editor is kinda weird you have to update the item after you change it, and then before you close it or are done editing go file/save to k try that!
|
| ![]() tht didnt work :[
|
| ![]() Well the only other assistance I can offer would be over team view, my brains tapped out of ideas unless I can see whats going on first hand.
| |