game2006/server/gameserver/frag_mitask.cc
aozhiwei 2cbc78c1d1 1
2023-11-06 19:13:25 +08:00

33 lines
886 B
C++

#include "precompile.h"
#include "frag_mitask.h"
#include "room.h"
#include "player.h"
#include "gridservice.h"
#include "creature.h"
#include "obstacle.h"
#include "explosion.h"
#include "entityfactory.h"
#include "mt/Equip.h"
void FragMiTask::Done()
{
Position center = bomb_pos;
if (follow_target.Get()) {
bomb_pos = follow_target.Get()->GetPos();
center = bomb_pos;
}
std::shared_ptr<Explosion> explosion = EntityFactory::Instance()->MakeExplosion();
if (force_target.Get()) {
explosion->AddForceTarget(force_target);
}
explosion->bullet_uniid = bullet_uniid;
explosion->EnemyAndObstacleAttack(sender,
center,
explosion_range,
gun_meta->explosion_effect(),
GetAtk());
}