mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Feature] Enable spawn attribute for NPCTintID (#4871)
* Add scripting for NPCTintIndex * AddNPCTintID Add NPCTintID to spawn logic * Update base_npc_types_repository.h * Correct version.h
This commit is contained in:
+21
-18
@@ -101,7 +101,8 @@ Mob::Mob(
|
||||
bool in_always_aggro,
|
||||
int32 in_heroic_strikethrough,
|
||||
bool in_keeps_sold_items,
|
||||
int64 in_hp_regen_per_second
|
||||
int64 in_hp_regen_per_second,
|
||||
uint32 npc_tint_id
|
||||
) :
|
||||
attack_timer(2000),
|
||||
attack_dw_timer(2000),
|
||||
@@ -289,6 +290,7 @@ Mob::Mob(
|
||||
always_aggro = in_always_aggro;
|
||||
heroic_strikethrough = in_heroic_strikethrough;
|
||||
keeps_sold_items = in_keeps_sold_items;
|
||||
m_npc_tint_id = npc_tint_id;
|
||||
|
||||
InitializeBuffSlots();
|
||||
|
||||
@@ -1285,23 +1287,24 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
strn0cpy(ns->spawn.lastName, lastname, sizeof(ns->spawn.lastName));
|
||||
}
|
||||
|
||||
ns->spawn.heading = FloatToEQ12(m_Position.w);
|
||||
ns->spawn.x = FloatToEQ19(m_Position.x);//((int32)x_pos)<<3;
|
||||
ns->spawn.y = FloatToEQ19(m_Position.y);//((int32)y_pos)<<3;
|
||||
ns->spawn.z = FloatToEQ19(m_Position.z);//((int32)z_pos)<<3;
|
||||
ns->spawn.spawnId = GetID();
|
||||
ns->spawn.curHp = static_cast<uint8>(GetHPRatio());
|
||||
ns->spawn.max_hp = 100; //this field needs a better name
|
||||
ns->spawn.race = (use_model) ? use_model : race;
|
||||
ns->spawn.runspeed = runspeed;
|
||||
ns->spawn.walkspeed = walkspeed;
|
||||
ns->spawn.class_ = class_;
|
||||
ns->spawn.gender = gender;
|
||||
ns->spawn.level = level;
|
||||
ns->spawn.PlayerState = GetPlayerState();
|
||||
ns->spawn.deity = deity;
|
||||
ns->spawn.animation = 0;
|
||||
ns->spawn.findable = findable?1:0;
|
||||
ns->spawn.heading = FloatToEQ12(m_Position.w);
|
||||
ns->spawn.x = FloatToEQ19(m_Position.x); //((int32)x_pos)<<3;
|
||||
ns->spawn.y = FloatToEQ19(m_Position.y); //((int32)y_pos)<<3;
|
||||
ns->spawn.z = FloatToEQ19(m_Position.z); //((int32)z_pos)<<3;
|
||||
ns->spawn.spawnId = GetID();
|
||||
ns->spawn.curHp = static_cast<uint8>(GetHPRatio());
|
||||
ns->spawn.max_hp = 100; // this field needs a better name
|
||||
ns->spawn.race = (use_model) ? use_model : race;
|
||||
ns->spawn.runspeed = runspeed;
|
||||
ns->spawn.walkspeed = walkspeed;
|
||||
ns->spawn.class_ = class_;
|
||||
ns->spawn.gender = gender;
|
||||
ns->spawn.level = level;
|
||||
ns->spawn.PlayerState = GetPlayerState();
|
||||
ns->spawn.deity = deity;
|
||||
ns->spawn.animation = 0;
|
||||
ns->spawn.findable = findable ? 1 : 0;
|
||||
ns->spawn.npc_tint_id = GetNpcTintId();
|
||||
|
||||
UpdateActiveLight();
|
||||
ns->spawn.light = m_Light.Type[EQ::lightsource::LightActive];
|
||||
|
||||
Reference in New Issue
Block a user