#pragma once #include "cs_proto.pb.h" #include "weakptr.h" namespace MetaData { struct Equip; } class Bullet; class Human; class Buff; class Room; class Creature; struct FrameEvent { public: Room* room = nullptr; void AddAirDrop(int appear_time, int box_id, a8::Vec2 box_pos); void AddAirRaid(int appear_time, const a8::Vec2& raid_pos, float raid_rad); void AddEmote(CreatureWeakPtr& sender, int emote_id); void AddShot(CreatureWeakPtr& sender); void AddBullet(int bullet_uniid, CreatureWeakPtr& sender, MetaData::Equip* weapon_meta, int weapon_lv, a8::Vec2 born_pos, a8::Vec2 dir, float fly_distance); void RemoveBullet(a8::Vec2 pos, int bullet_uniid); void AddExplosion(Bullet* bullet, int item_id, a8::Vec2 bomb_pos); void AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos, float time_addition); void AddPlaySkill(CreatureWeakPtr& sender, int skill_id); void AddExplosionEx(CreatureWeakPtr& sender, int item_id, a8::Vec2 bomb_pos, int effect); void AddBulletNumChg(CreatureWeakPtr& sender); void AddHpChg(CreatureWeakPtr& sender); void AddWeaponAmmoChg(CreatureWeakPtr& sender); void AddBuff(CreatureWeakPtr& sender, Buff* buff); void RemoveBuff(CreatureWeakPtr& sender, int buff_id); void AddSkillCdChg(CreatureWeakPtr sender, int skill_id, int left_time); void AddSkillCurrTimesChg(CreatureWeakPtr sender, int skill_id, int curr_times); void AddItemChg(CreatureWeakPtr& sender, int item_id, int item_num); void AddDead(CreatureWeakPtr& sender, int revive_time); void AddRevive(CreatureWeakPtr& sender); void AddCarChg(CreatureWeakPtr& sender); void AddPropChg(CreatureWeakPtr& sender, int type, int subtype, float value, bool only_self = false); void Clear(); private: ::google::protobuf::RepeatedPtrField<::cs::MFAirDrop> airdrops_; ::google::protobuf::RepeatedPtrField<::cs::MFAirRaid> airraids_; std::vector> shots_; std::vector> bullets_; std::vector> explosions_; std::vector> smokes_; std::vector> play_skills_; std::vector> emotes_; std::vector> chged_buffs_; std::vector> chged_items_; std::vector chged_bullet_nums_; std::vector> chged_weapon_ammo_; std::vector chged_hps_; std::vector> chged_skillcds_; std::vector> chged_skill_curr_times_; std::vector chged_cars_; std::vector> dead_alive_objs_; std::vector> chged_props_; std::vector del_bullets_; friend class FrameMaker; };