game2005/server/gameserver/frameevent.h
aozhiwei 9166c94882 1
2021-03-23 14:19:35 +08:00

57 lines
2.1 KiB
C++

#pragma once
#include "cs_proto.pb.h"
class Bullet;
class Human;
class Buff;
class Room;
class Creature;
struct FrameEvent
{
public:
void AddAirDrop(int appear_time, int box_id, a8::Vec2 box_pos);
void AddEmote(Human* hum, int emote_id);
void AddShot(Creature* sender);
void AddBullet(Creature* sender,
MetaData::Equip* weapon_meta,
int weapon_lv,
a8::Vec2 born_pos,
a8::Vec2 dir,
float fly_distance);
void AddExplosion(Bullet* bullet, int item_id, a8::Vec2 bomb_pos);
void AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos);
void AddExplosionEx(Creature* sender, int item_id, a8::Vec2 bomb_pos, int effect);
void AddBulletNumChg(Human* hum);
void AddHpChg(Human* hum);
void AddWeaponAmmoChg(Human* hum);
void AddBuff(Human* hum, Buff* buff);
void RemoveBuff(Human* hum, int buff_id);
void AddSkillCdChg(Human* hum, int skill_id, int left_time);
void AddItemChg(Human* hum, int item_id, int item_num);
void AddZombieIdChg(Human* hum);
void AddDead(Human* sender, int revive_time);
void AddRevive(Human* sender);
void AddCarChg(Human* sender);
void Clear();
private:
::google::protobuf::RepeatedPtrField<::cs::MFAirDrop> airdrops_;
std::vector<std::tuple<Creature*, ::cs::MFShot>> shots_;
std::vector<std::tuple<Creature*, ::cs::MFBullet>> bullets_;
std::vector<std::tuple<Creature*, ::cs::MFExplosion>> explosions_;
std::vector<std::tuple<Creature*, ::cs::MFSmoke>> smokes_;
std::vector<std::tuple<Creature*, ::cs::MFEmote>> emotes_;
std::vector<std::tuple<Creature*, ::cs::MFBuffChg>> chged_buffs_;
std::vector<std::tuple<Human*, int, int>> chged_items_;
std::vector<Human*> chged_bullet_nums_;
std::vector<std::tuple<Human*, int, int>> chged_weapon_ammo_;
std::vector<Human*> chged_hps_;
std::vector<std::tuple<Human*, int, int>> chged_skillcds_;
std::vector<Human*> chged_zombieids_;
std::vector<Human*> chged_cars_;
std::vector<std::tuple<int, int, int>> dead_alive_objs_;
friend class FrameMaker;
};