添加调试日志
This commit is contained in:
parent
1f80cc086e
commit
9974333789
@ -27,6 +27,7 @@
|
|||||||
#include "framework/cpp/msgqueue.h"
|
#include "framework/cpp/msgqueue.h"
|
||||||
#include "framework/cpp/tglog.h"
|
#include "framework/cpp/tglog.h"
|
||||||
#include "framework/cpp/httpclientpool.h"
|
#include "framework/cpp/httpclientpool.h"
|
||||||
|
#include "framework/cpp/utils.h"
|
||||||
|
|
||||||
struct MsgNode
|
struct MsgNode
|
||||||
{
|
{
|
||||||
@ -103,6 +104,7 @@ static void SavePerfLog()
|
|||||||
|
|
||||||
bool App::Init(int argc, char* argv[])
|
bool App::Init(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
is_dev_env = !f8::IsOnlineEnv();
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
this->argc = argc;
|
this->argc = argc;
|
||||||
this->argv = argv;
|
this->argv = argv;
|
||||||
|
@ -58,6 +58,7 @@ public:
|
|||||||
volatile bool terminated = false;
|
volatile bool terminated = false;
|
||||||
PerfMonitor perf;
|
PerfMonitor perf;
|
||||||
a8::uuid::SnowFlake uuid;
|
a8::uuid::SnowFlake uuid;
|
||||||
|
bool is_dev_env = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int instance_id = 0;
|
int instance_id = 0;
|
||||||
|
@ -226,6 +226,14 @@ void Bullet::ProcMissible(const a8::XParams& param)
|
|||||||
float def = target->ability.def;
|
float def = target->ability.def;
|
||||||
float finally_dmg = power * (1 - def/MetaMgr::Instance()->K);
|
float finally_dmg = power * (1 - def/MetaMgr::Instance()->K);
|
||||||
sender->stats.damage_amount_out += finally_dmg;
|
sender->stats.damage_amount_out += finally_dmg;
|
||||||
|
if (App::Instance()->is_dev_env) {
|
||||||
|
sender->SendDebugMsg(a8::Format("伤害输出 atk:%d def:%d finally_dmg:%d",
|
||||||
|
{
|
||||||
|
power,
|
||||||
|
def,
|
||||||
|
finally_dmg
|
||||||
|
}));
|
||||||
|
}
|
||||||
target->DecHP(finally_dmg,
|
target->DecHP(finally_dmg,
|
||||||
sender->entity_uniid,
|
sender->entity_uniid,
|
||||||
sender->name,
|
sender->name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user