this goes into spdat.h right on the bottom of the struct
i left some recognizable code above and below my additions so you'll hopefully know where exactly to place it. it doesnt mean that you have to insert EVERY line, just the lines that werent there before. (original code is
italic)
Quote:
int16 ResistDiff;
int16 Spacing3[2];
int16 RecourseLink;
int16 Spacing4[1];
|
this goes into the zone-servers net.cpp (kinda at the bottom of the Load-function
Quote:
a=0;
for(u=0;u<64;u++)
token[u]=(char)0;
in.get(temp);
while(chrcmpI(&temp,&sep))
{
strncat(token,&temp,1);
a++;
in.get(temp);
}
spells[tempid].SpellAffectIndex=atoi(token);
//cout << spells[tempid].SpellAffectIndex << '^';
a=0;
for(u=0;u<64;u++)
token[u]=(char)0;
for(y=0; y< 23;y++)
{
in.get(temp);
while(chrcmpI(&temp,&sep))
{
strncat(token,&temp,1);
a++;
in.get(temp);
}
spells[tempid].Spacing2[y]=atoi(token);
//cout << spells[tempid].base[y] << '^';
a=0;
for(u=0;u<64;u++)
token[u]=(char)0;
}
in.get(temp);
while(chrcmpI(&temp,&sep))
{
strncat(token,&temp,1);
a++;
in.get(temp);
}
spells[tempid].ResistDiff=atoi(token);
//cout << spells[tempid].ResistDiff << '^';
a=0;
for(u=0;u<64;u++) token[u]=(char)0;
in.get(temp);
for(y=0; y< 2;y++)
{
in.get(temp);
while(chrcmpI(&temp,&sep))
{
strncat(token,&temp,1);
a++;
in.get(temp);
}
spells[tempid].Spacing3[y]=atoi(token);
//cout << spells[tempid].Spacing3[y] << '^';
a=0;
for(u=0;u<64;u++)
token[u]=(char)0;
}
a=0;
for(u=0;u<64;u++) token[u]=(char)0;
in.get(temp);
while(chrcmpI(&temp,&sep))
{
strncat(token,&temp,1);
a++;
in.get(temp);
}
spells[tempid].RecourseLink=atoi(token);
//if (spells[tempid].RecourseLink)
// cerr << " [" << tempid << "]RL = " << spells[tempid].RecourseLink << endl;
a=0;
for(u=0;u<64;u++) token[u]=(char)0;
/*
in.get(temp);
for(y=0; y< 1;y++)
{
in.get(temp);
while(chrcmpI(&temp,&sep))
{
strncat(token,&temp,1);
a++;
in.get(temp);
}
spells[tempid].Spacing4[y]=atoi(token);
//cout << spells[tempid].base[y] << '^';
a=0;
for(u=0;u<64;u++)
token[u]=(char)0;
}*/
while(temp!='\n')
in.get(temp);
//cout << endl;
if(tempid==SPDAT_RECORDS-1) break;
|
once RecourseLink is successfully recognized and added to the spell-struct we need to do something with it.
this code goes into the spell.cpp Mob::SpellFinished function
Quote:
else if (spell_id == 1948 && (this->IsClient() && (this->CastToClient()->Admin() <= 79))) { // Destroy
// This spell is lame!
}
else {
// if (target->CastToClient()->pp.pvp != NULL && /*TargetSelf*/(target->GetID() == this->GetID()) || /*TargetAlsoPVP*/(target->CastToClient()->pp.pvp == 1 && this->CastToClient()->pp.pvp == 1) || /*TargetPetAlsoPVP*/(target->GetOwner()->CastToClient()->pp.pvp == 1 && this->CastToClient()->pp.pvp == 1) || /*TargetNonPVP*/(target->CastToClient()->pp.pvp == 0 && this->CastToClient()->pp.pvp == 0) || /*TargetPetNonPVP*/(target->GetOwner()->CastToClient()->pp.pvp == 0 && this->CastToClient()->pp.pvp == 0) || /*TargetNPC*/(target->IsNPC())) {
//Message(0, "I dont know that TargetType. 0x%x", spells[spell_id].targettype);
// neotokyo: 09-Nov-02
// Recourse means there is a spell linked to that spell in that the recourse spell will
// be automatically casted on the casters group or the caster only depending on Targettype
if (spells[spell_id].RecourseLink != 0)
{
if (spells[spells[spell_id].RecourseLink].targettype != ST_Self && this->IsClient() && this->CastToClient()->isgrouped && entity_list.GetGroupByClient(this->CastToClient()) != 0)
entity_list.GetGroupByClient(this->CastToClient())->CastGroupSpell(this->CastToClient(),spells[spell_id].RecourseLink);
if (spells[spells[spell_id].RecourseLink].targettype == ST_Self || (this-IsClient() && !this->CastToClient()->isgrouped))
SpellOnTarget(spells[spell_id].RecourseLink,this);
}
switch (spells[spell_id].targettype)
{
case ST_Tap:
|
and thats about it. i think. hopefully.
PS: i dont have any idea how to tell the board to leave the blanks at the beginning so the code remains readable :-((( think you'll have to prettify it yourself ...