mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Merge pull request #388 from iequalshane/master
Enable multiple NPC equipment materials
This commit is contained in:
commit
a569e20110
@ -54,7 +54,7 @@ Beacon::Beacon(Mob *at_mob, int lifetime)
|
||||
:Mob
|
||||
(
|
||||
nullptr, nullptr, 0, 0, 0, INVISIBLE_MAN, 0, BT_NoTarget, 0, 0, 0, 0, 0, at_mob->GetPosition(), 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
),
|
||||
remove_timer(lifetime),
|
||||
spell_timer(0)
|
||||
|
||||
@ -107,8 +107,12 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
0,
|
||||
0, // qglobal
|
||||
0, // maxlevel
|
||||
0 // scalerate
|
||||
|
||||
0, // scalerate
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
),
|
||||
//these must be listed in the order they appear in client.h
|
||||
position_timer(250),
|
||||
|
||||
@ -152,7 +152,7 @@ Corpse::Corpse(NPC* in_npc, ItemList* in_itemlist, uint32 in_npctypeid, const NP
|
||||
in_npc->GetDeity(),in_npc->GetLevel(),in_npc->GetNPCTypeID(),in_npc->GetSize(),0,
|
||||
in_npc->GetPosition(), in_npc->GetInnateLightType(), in_npc->GetTexture(),in_npc->GetHelmTexture(),
|
||||
0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0xff,0,0,0,0,0,0,0,0,0),
|
||||
0,0,0,0,0,0,0,0,0,0,0,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
|
||||
corpse_decay_timer(in_decaytime),
|
||||
corpse_rez_timer(0),
|
||||
corpse_delay_timer(RuleI(NPC, CorpseUnlockTimer)),
|
||||
@ -253,7 +253,12 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
||||
0, // int32 in_mana_regen,
|
||||
0, // uint8 in_qglobal,
|
||||
0, // uint8 in_maxlevel,
|
||||
0 // uint32 in_scalerate
|
||||
0, // uint32 in_scalerate
|
||||
0, // uint8 in_armtexture,
|
||||
0, // uint8 in_bracertexture,
|
||||
0, // uint8 in_handtexture,
|
||||
0, // uint8 in_legtexture,
|
||||
0 // uint8 in_feettexture,
|
||||
),
|
||||
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
||||
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
||||
@ -478,6 +483,11 @@ in_helmtexture,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0),
|
||||
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
||||
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
||||
|
||||
16
zone/mob.cpp
16
zone/mob.cpp
@ -83,7 +83,12 @@ Mob::Mob(const char* in_name,
|
||||
int32 in_mana_regen,
|
||||
uint8 in_qglobal,
|
||||
uint8 in_maxlevel,
|
||||
uint32 in_scalerate
|
||||
uint32 in_scalerate,
|
||||
uint8 in_armtexture,
|
||||
uint8 in_bracertexture,
|
||||
uint8 in_handtexture,
|
||||
uint8 in_legtexture,
|
||||
uint8 in_feettexture
|
||||
) :
|
||||
attack_timer(2000),
|
||||
attack_dw_timer(2000),
|
||||
@ -158,6 +163,13 @@ Mob::Mob(const char* in_name,
|
||||
|
||||
texture = in_texture;
|
||||
helmtexture = in_helmtexture;
|
||||
armtexture = in_armtexture;
|
||||
bracertexture = in_bracertexture;
|
||||
handtexture = in_handtexture;
|
||||
legtexture = in_legtexture;
|
||||
feettexture = in_feettexture;
|
||||
multitexture = (armtexture || bracertexture || handtexture || legtexture || feettexture);
|
||||
|
||||
haircolor = in_haircolor;
|
||||
beardcolor = in_beardcolor;
|
||||
eyecolor1 = in_eyecolor1;
|
||||
@ -930,7 +942,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
ns->spawn.drakkin_heritage = drakkin_heritage;
|
||||
ns->spawn.drakkin_tattoo = drakkin_tattoo;
|
||||
ns->spawn.drakkin_details = drakkin_details;
|
||||
ns->spawn.equip_chest2 = GetHerosForgeModel(1) != 0 ? 0xff : texture;
|
||||
ns->spawn.equip_chest2 = GetHerosForgeModel(1) != 0 || multitexture? 0xff : texture;
|
||||
|
||||
// ns->spawn.invis2 = 0xff;//this used to be labeled beard.. if its not FF it will turn mob invis
|
||||
|
||||
|
||||
13
zone/mob.h
13
zone/mob.h
@ -112,7 +112,12 @@ public:
|
||||
int32 in_mana_regen,
|
||||
uint8 in_qglobal,
|
||||
uint8 in_maxlevel,
|
||||
uint32 in_scalerate
|
||||
uint32 in_scalerate,
|
||||
uint8 in_armtexture,
|
||||
uint8 in_bracertexture,
|
||||
uint8 in_handtexture,
|
||||
uint8 in_legtexture,
|
||||
uint8 in_feettexture
|
||||
);
|
||||
virtual ~Mob();
|
||||
|
||||
@ -971,6 +976,12 @@ protected:
|
||||
uint16 entity_id_being_looted; //the id of the entity being looted, 0 if not looting.
|
||||
uint8 texture;
|
||||
uint8 helmtexture;
|
||||
uint8 armtexture;
|
||||
uint8 bracertexture;
|
||||
uint8 handtexture;
|
||||
uint8 legtexture;
|
||||
uint8 feettexture;
|
||||
bool multitexture;
|
||||
|
||||
int AC;
|
||||
int32 ATK;
|
||||
|
||||
17
zone/npc.cpp
17
zone/npc.cpp
@ -103,7 +103,12 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if
|
||||
d->mana_regen,
|
||||
d->qglobal,
|
||||
d->maxlevel,
|
||||
d->scalerate ),
|
||||
d->scalerate,
|
||||
d->armtexture,
|
||||
d->bracertexture,
|
||||
d->handtexture,
|
||||
d->legtexture,
|
||||
d->feettexture),
|
||||
attacked_timer(CombatEventTimer_expire),
|
||||
swarm_timer(100),
|
||||
classattack_timer(1000),
|
||||
@ -1308,6 +1313,16 @@ int32 NPC::GetEquipmentMaterial(uint8 material_slot) const
|
||||
return helmtexture;
|
||||
case MaterialChest:
|
||||
return texture;
|
||||
case MaterialArms:
|
||||
return armtexture;
|
||||
case MaterialWrist:
|
||||
return bracertexture;
|
||||
case MaterialHands:
|
||||
return handtexture;
|
||||
case MaterialLegs:
|
||||
return legtexture;
|
||||
case MaterialFeet:
|
||||
return feettexture;
|
||||
case MaterialPrimary:
|
||||
return d_melee_texture1;
|
||||
case MaterialSecondary:
|
||||
|
||||
@ -1904,7 +1904,12 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
||||
"npc_types.no_target_hotkey, "
|
||||
"npc_types.raid_target, "
|
||||
"npc_types.attack_delay, "
|
||||
"npc_types.light "
|
||||
"npc_types.light, "
|
||||
"npc_types.armtexture, "
|
||||
"npc_types.bracertexture, "
|
||||
"npc_types.handtexture, "
|
||||
"npc_types.legtexture, "
|
||||
"npc_types.feettexture "
|
||||
"FROM npc_types %s",
|
||||
where_condition.c_str()
|
||||
);
|
||||
@ -2074,6 +2079,12 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
||||
temp_npctype_data->attack_delay = atoi(row[90]);
|
||||
temp_npctype_data->light = (atoi(row[91]) & 0x0F);
|
||||
|
||||
temp_npctype_data->armtexture = atoi(row[92]);
|
||||
temp_npctype_data->bracertexture = atoi(row[93]);
|
||||
temp_npctype_data->handtexture = atoi(row[94]);
|
||||
temp_npctype_data->legtexture = atoi(row[95]);
|
||||
temp_npctype_data->feettexture = atoi(row[96]);
|
||||
|
||||
// If NPC with duplicate NPC id already in table,
|
||||
// free item we attempted to add.
|
||||
if (zone->npctable.find(temp_npctype_data->npc_id) != zone->npctable.end()) {
|
||||
|
||||
@ -127,6 +127,11 @@ struct NPCType
|
||||
bool no_target_hotkey;
|
||||
bool raid_target;
|
||||
uint8 probability;
|
||||
uint8 armtexture;
|
||||
uint8 bracertexture;
|
||||
uint8 handtexture;
|
||||
uint8 legtexture;
|
||||
uint8 feettexture;
|
||||
};
|
||||
|
||||
namespace player_lootitem {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user