Implemented target type (44) 'Beams' (which projects an AE infront of caster with a specified length and width).

Clean up of target type direction code, implemented use of aemaxtargets field for it.
This commit is contained in:
KayenEQ
2014-11-13 02:25:18 -05:00
parent 16f72be898
commit fabe93e548
7 changed files with 178 additions and 51 deletions
+10 -3
View File
@@ -1847,6 +1847,7 @@ void NPC::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
Client *c = entity_list.GetClientByID(GetSwarmOwner());
if(c) {
SetAllowBeneficial(1); //Allow client cast swarm pets to be heal/buffed.
SetPetOwnerClient(true);
//This is a hack to allow CLIENT swarm pets NOT to be targeted with F8. Warning: Will turn name 'Yellow'!
if (RuleB(Pets, SwarmPetNotTargetableWithHotKey))
ns->spawn.IsMercenary = 1;
@@ -1862,16 +1863,20 @@ void NPC::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
ns->spawn.is_pet = 1;
if (!IsCharmed() && GetOwnerID()) {
Client *c = entity_list.GetClientByID(GetOwnerID());
if(c)
if(c){
SetPetOwnerClient(true);
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
}
}
else if (GetSwarmOwner()) {
ns->spawn.bodytype = 11;
if(!IsCharmed())
{
Client *c = entity_list.GetClientByID(GetSwarmOwner());
if(c)
if(c){
SetPetOwnerClient(true);
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
}
}
}
}
@@ -1880,8 +1885,10 @@ void NPC::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
ns->spawn.is_pet = 1;
if (!IsCharmed() && GetOwnerID()) {
Client *c = entity_list.GetClientByID(GetOwnerID());
if(c)
if(c){
SetPetOwnerClient(true);
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
}
}
} else
ns->spawn.is_pet = 0;