Fixed pets spawn script to not inherit other spawns
This commit is contained in:
parent
9d2dc8f186
commit
8b2549d178
2 changed files with 7 additions and 8 deletions
EQ2/source/WorldServer
|
@ -5265,12 +5265,12 @@ int EQ2Emu_lua_SummonPet(lua_State* state) {
|
|||
pet->SetHeading(spawn->GetHeading());
|
||||
spawn->GetZone()->AddSpawn(pet);
|
||||
|
||||
/*
|
||||
|
||||
const char* spawn_script = world.GetSpawnScript(pet_id);
|
||||
if(spawn_script && lua_interface->GetSpawnScript(spawn_script) != 0){
|
||||
spawn->SetSpawnScript(string(spawn_script));
|
||||
zone->CallSpawnScript(spawn, SPAWN_SCRIPT_SPAWN);
|
||||
}*/
|
||||
spawn->GetZone()->CallSpawnScript(spawn, SPAWN_SCRIPT_SPAWN);
|
||||
}
|
||||
|
||||
// Get a random pet name
|
||||
string random_pet_name;
|
||||
|
@ -7868,13 +7868,12 @@ int EQ2Emu_lua_SummonDumbFirePet(lua_State* state) {
|
|||
pet->SetLocation(spawn->GetLocation());
|
||||
pet->SetHeading(spawn->GetHeading());
|
||||
spawn->GetZone()->AddSpawn(pet);
|
||||
|
||||
/*
|
||||
|
||||
const char* spawn_script = world.GetSpawnScript(pet_id);
|
||||
if(spawn_script && lua_interface->GetSpawnScript(spawn_script) != 0){
|
||||
spawn->SetSpawnScript(string(spawn_script));
|
||||
zone->CallSpawnScript(spawn, SPAWN_SCRIPT_SPAWN);
|
||||
}*/
|
||||
spawn->GetZone()->CallSpawnScript(spawn, SPAWN_SCRIPT_SPAWN);
|
||||
}
|
||||
|
||||
// Get a random pet name
|
||||
string random_pet_name;
|
||||
|
|
|
@ -2852,7 +2852,7 @@ bool ZoneServer::CallSpawnScript(Spawn* npc, int8 type, Spawn* spawn, const char
|
|||
const char* script = npc->GetSpawnScript();
|
||||
if ( script == nullptr || strlen(script) < 1 )
|
||||
{
|
||||
if (npc->GetZone() != nullptr)
|
||||
if (!npc->IsPet() && npc->GetZone() != nullptr)
|
||||
{
|
||||
string tmpScript;
|
||||
tmpScript.append("SpawnScripts/");
|
||||
|
|
Loading…
Add table
Reference in a new issue