#include "precompile.h" #include "loot.h" #include "metamgr.h" #include "room.h" #include "collider.h" #include "entity.h" #include "app.h" #include "typeconvert.h" #include "perfmonitor.h" Loot::Loot():RoomEntity() { ++PerfMonitor::Instance()->entity_num[ET_Loot]; } Loot::~Loot() { --PerfMonitor::Instance()->entity_num[ET_Loot]; } void Loot::Initialize() { RoomEntity::Initialize(); RecalcSelfCollider(); } void Loot::RecalcSelfCollider() { } void Loot::FillMFObjectPart(Room* room, Human* hum, cs::MFObjectPart* part_data) { part_data->set_object_type(ET_Loot); cs::MFLootPart* p = part_data->mutable_union_obj_5(); p->set_obj_uniid(GetEntityUniId()); TypeConvert::ToPb(GetPos(), p->mutable_pos()); } void Loot::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data) { full_data->set_object_type(ET_Loot); cs::MFLootFull* p = full_data->mutable_union_obj_5(); p->set_obj_uniid(GetEntityUniId()); TypeConvert::ToPb(GetPos(), p->mutable_pos()); p->set_item_id(item_id); p->set_count(count); p->set_item_level(item_level); }