Merge branch 'master' into auras

This commit is contained in:
Michael Cook (mackal)
2017-07-19 02:19:13 -04:00
12 changed files with 27 additions and 10 deletions
+1
View File
@@ -1944,6 +1944,7 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
ns->spawn.guildID = GuildID();
// ns->spawn.linkdead = IsLD() ? 1 : 0;
// ns->spawn.pvp = GetPVP() ? 1 : 0;
ns->spawn.show_name = true;
strcpy(ns->spawn.title, m_pp.title);
+4
View File
@@ -659,6 +659,8 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue)
QueueClients(npc, app);
npc->SendArmorAppearance();
npc->SetAppearance(npc->GetGuardPointAnim(),false);
if (!npc->IsTargetable())
npc->SendTargetable(false);
safe_delete(app);
} else {
auto ns = new NewSpawn_Struct;
@@ -799,6 +801,8 @@ void EntityList::CheckSpawnQueue()
NPC *pnpc = it->second;
pnpc->SendArmorAppearance();
pnpc->SetAppearance(pnpc->GetGuardPointAnim(), false);
if (!pnpc->IsTargetable())
pnpc->SendTargetable(false);
}
safe_delete(outapp);
iterator.RemoveCurrent();
+2
View File
@@ -375,6 +375,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if
CalcBonuses();
raid_target = d->raid_target;
ignore_despawn = d->ignore_despawn;
m_targetable = !d->untargetable;
}
NPC::~NPC()
@@ -1906,6 +1907,7 @@ void NPC::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
ns->spawn.is_npc = 1;
UpdateActiveLight();
ns->spawn.light = GetActiveLightType();
ns->spawn.show_name = NPCTypedata->show_name;
}
void NPC::PetOnSpawn(NewSpawn_Struct* ns)
+5 -1
View File
@@ -1968,7 +1968,9 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
"npc_types.handtexture, "
"npc_types.legtexture, "
"npc_types.feettexture, "
"npc_types.ignore_despawn "
"npc_types.ignore_despawn, "
"npc_types.show_name, "
"npc_types.untargetable "
"FROM npc_types %s",
where_condition.c_str()
);
@@ -2144,6 +2146,8 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
temp_npctype_data->legtexture = atoi(row[95]);
temp_npctype_data->feettexture = atoi(row[96]);
temp_npctype_data->ignore_despawn = atoi(row[97]) == 1 ? true : false;
temp_npctype_data->show_name = atoi(row[98]) != 0 ? true : false;
temp_npctype_data->untargetable = atoi(row[99]) != 0 ? true : false;
// If NPC with duplicate NPC id already in table,
// free item we attempted to add.
+2
View File
@@ -133,6 +133,8 @@ struct NPCType
uint8 legtexture;
uint8 feettexture;
bool ignore_despawn;
bool show_name; // should default on
bool untargetable;
};
namespace player_lootitem {