game2006/server/gameserver/frameevent.h
aozhiwei c8cb48afe2 1
2021-04-08 13:44:52 +08:00

62 lines
2.5 KiB
C++

#pragma once
#include "cs_proto.pb.h"
#include "weakptr.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 AddPlaySkill(CreatureWeakPtr& sender, int skill_id);
void AddExplosionEx(CreatureWeakPtr& 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(CreatureWeakPtr sender, int skill_id, int left_time);
void AddSkillCurrTimesChg(CreatureWeakPtr sender, int skill_id, int curr_times);
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<CreatureWeakPtr, ::cs::MFExplosion>> explosions_;
std::vector<std::tuple<CreatureWeakPtr, ::cs::MFSmoke>> smokes_;
std::vector<std::tuple<CreatureWeakPtr, ::cs::MFPlaySkill>> play_skills_;
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<CreatureWeakPtr, int, int>> chged_skillcds_;
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_skill_curr_times_;
std::vector<Human*> chged_zombieids_;
std::vector<Human*> chged_cars_;
std::vector<std::tuple<int, int, int>> dead_alive_objs_;
friend class FrameMaker;
};