diff --git a/src/map/achievement.cpp b/src/map/achievement.cpp index 766414b012..4ad79c9f9d 100644 --- a/src/map/achievement.cpp +++ b/src/map/achievement.cpp @@ -167,7 +167,7 @@ uint64 AchievementDatabase::parseBodyNode(const YAML::Node &node){ return 0; } - uint32 mob_id = mob->vd.class_; + uint32 mob_id = mob->id; if( !this->mobexists( mob_id ) ){ this->achievement_mobs.push_back( mob_id ); diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index 40f1811cfe..62d7862157 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -7431,9 +7431,9 @@ ACMD_FUNC(mobinfo) #endif // stats if( mob->get_bosstype() == BOSSTYPE_MVP ) - sprintf(atcmd_output, msg_txt(sd,1240), mob->name.c_str(), mob->jname.c_str(), mob->sprite.c_str(), mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d) + sprintf(atcmd_output, msg_txt(sd,1240), mob->name.c_str(), mob->jname.c_str(), mob->sprite.c_str(), mob->id); // MVP Monster: '%s'/'%s'/'%s' (%d) else - sprintf(atcmd_output, msg_txt(sd,1241), mob->name.c_str(), mob->jname.c_str(), mob->sprite.c_str(), mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d) + sprintf(atcmd_output, msg_txt(sd,1241), mob->name.c_str(), mob->jname.c_str(), mob->sprite.c_str(), mob->id); // Monster: '%s'/'%s'/'%s' (%d) clif_displaymessage(fd, atcmd_output); sprintf(atcmd_output, msg_txt(sd,1242), mob->lv, mob->status.max_hp, base_exp, job_exp, MOB_HIT(mob), MOB_FLEE(mob)); // Lv:%d HP:%d Base EXP:%llu Job EXP:%llu HIT:%d FLEE:%d clif_displaymessage(fd, atcmd_output); diff --git a/src/map/mob.cpp b/src/map/mob.cpp index a6d66f434b..539ad2bf9d 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -4283,7 +4283,8 @@ uint64 MobDatabase::parseBodyNode(const YAML::Node &node) { return 0; mob = std::make_shared(); - mob->vd.class_ = static_cast(mob_id); + mob->id = mob_id; + mob->vd.class_ = static_cast(mob->id); } if (this->nodeExists(node, "AegisName")) { @@ -5191,7 +5192,7 @@ uint64 MobAvailDatabase::parseBodyNode(const YAML::Node &node) { return 0; } - constant = sprite_mob->vd.class_; + constant = sprite_mob->id; } mob->vd.class_ = (unsigned short)constant; @@ -5391,7 +5392,7 @@ uint64 MobAvailDatabase::parseBodyNode(const YAML::Node &node) { } if (this->nodeExists(node, "PetEquip")) { - std::shared_ptr pet_db_ptr = pet_db.find(mob->vd.class_); + std::shared_ptr pet_db_ptr = pet_db.find(mob->id); if (pet_db_ptr == nullptr) { this->invalidWarning(node["PetEquip"], "PetEquip is only applicable to defined pets.\n"); @@ -5500,7 +5501,8 @@ uint64 MobSummonDatabase::parseBodyNode(const YAML::Node &node) { this->invalidWarning(node["Default"], "Unknown mob %s.\n", mob_name.c_str()); return 0; } - summon->default_mob_id = mob->vd.class_; + + summon->default_mob_id = mob->id; } if (this->nodeExists(node, "Summon")) { @@ -5528,7 +5530,7 @@ uint64 MobSummonDatabase::parseBodyNode(const YAML::Node &node) { if (!this->asUInt32(mobit, "Rate", rate)) continue; - uint16 mob_id = mob->vd.class_; + uint16 mob_id = mob->id; if (rate == 0) { if (summon->list.erase(mob_id) == 0) @@ -5540,7 +5542,7 @@ uint64 MobSummonDatabase::parseBodyNode(const YAML::Node &node) { if (entry == nullptr) { entry = std::make_shared(); - entry->mob_id = mob->vd.class_; + entry->mob_id = mob_id; summon->list[mob_id] = entry; } entry->rate = rate; @@ -6153,7 +6155,7 @@ static void mob_skill_db_set_single_sub(std::shared_ptr mob, struct s_ } if (i < skill->skill.size()) - ShowWarning("Monster '%s' (%d, src:%d) reaches max skill limit %d. Ignores '%zu' skills left.\n", mob->sprite.c_str(), mob->vd.class_, skill->mob_id, MAX_MOBSKILL, skill->skill.size() - i); + ShowWarning("Monster '%s' (%d, src:%d) reaches max skill limit %d. Ignores '%zu' skills left.\n", mob->sprite.c_str(), mob->id, skill->mob_id, MAX_MOBSKILL, skill->skill.size() - i); } /** diff --git a/src/map/mob.hpp b/src/map/mob.hpp index d1bc61b8ac..b81e6e3bcd 100644 --- a/src/map/mob.hpp +++ b/src/map/mob.hpp @@ -226,6 +226,7 @@ struct s_mob_drop { }; struct s_mob_db { + uint32 id; std::string sprite, name, jname; t_exp base_exp; t_exp job_exp; diff --git a/src/map/pet.cpp b/src/map/pet.cpp index c80d8ce57f..cb4e14a90c 100644 --- a/src/map/pet.cpp +++ b/src/map/pet.cpp @@ -53,7 +53,7 @@ uint64 PetDatabase::parseBodyNode( const YAML::Node &node ){ return 0; } - uint16 mob_id = mob->vd.class_; + uint16 mob_id = mob->id; std::shared_ptr pet = this->find( mob_id ); bool exists = pet != nullptr; @@ -419,7 +419,7 @@ uint64 PetDatabase::parseBodyNode( const YAML::Node &node ){ return 0; } - uint16 targetId = mob->vd.class_; + uint16 targetId = mob->id; if( !this->nodeExists( evolutionNode, "ItemRequirements" ) ){ this->invalidWarning( evolutionNode, "Missing required node \"ItemRequirements\".\n" ); diff --git a/src/map/quest.cpp b/src/map/quest.cpp index f5321dfc10..ba108aa1a3 100644 --- a/src/map/quest.cpp +++ b/src/map/quest.cpp @@ -128,7 +128,7 @@ uint64 QuestDatabase::parseBodyNode(const YAML::Node &node) { return 0; } - mob_id = mob->vd.class_; + mob_id = mob->id; it = std::find_if(quest->objectives.begin(), quest->objectives.end(), [&](std::shared_ptr const &v) { return (*v).mob_id == mob_id; @@ -338,7 +338,7 @@ uint64 QuestDatabase::parseBodyNode(const YAML::Node &node) { continue; } - mob_id = mob->vd.class_; + mob_id = mob->id; } //std::shared_ptr target = util::vector_find(quest->dropitem, mob_id); diff --git a/src/map/unit.hpp b/src/map/unit.hpp index b191a8897b..5a40a7d530 100644 --- a/src/map/unit.hpp +++ b/src/map/unit.hpp @@ -64,11 +64,7 @@ struct unit_data { }; struct view_data { -#ifdef __64BIT__ - unsigned int class_; //why arch dependant ??? make no sense imo [lighta] -#else - unsigned short class_; -#endif + uint16 class_; t_itemid weapon, shield, //Or left-hand weapon.