修复救人bug
This commit is contained in:
parent
1e7b83be9a
commit
96c1ae8039
@ -3,6 +3,8 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
|
#include <a8/magicenum.h>
|
||||||
|
|
||||||
#include "buff.h"
|
#include "buff.h"
|
||||||
#include "human.h"
|
#include "human.h"
|
||||||
#include "room.h"
|
#include "room.h"
|
||||||
@ -49,10 +51,50 @@ void Buff::Init()
|
|||||||
res_scale = meta->GetResScale(this);
|
res_scale = meta->GetResScale(this);
|
||||||
res_scale_frameno = owner->room->GetFrameNo();
|
res_scale_frameno = owner->room->GetFrameNo();
|
||||||
}
|
}
|
||||||
|
#ifdef MYDEBUG
|
||||||
|
switch (meta->buff_effect()) {
|
||||||
|
case kBET_InRescue:
|
||||||
|
case kBET_Rescuer:
|
||||||
|
{
|
||||||
|
a8::XPrintf("add jiuyuan role_name:%s type:%s buff_id:%d buff_effect:%\n",
|
||||||
|
{
|
||||||
|
owner->GetName(),
|
||||||
|
owner->IsPlayer() ? "player" : "android",
|
||||||
|
meta->buff_id(),
|
||||||
|
a8::GetEnumName<BuffEffectType_e>(meta->buff_effect())
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Buff::UnInit()
|
void Buff::UnInit()
|
||||||
{
|
{
|
||||||
|
#ifdef MYDEBUG
|
||||||
|
switch (meta->buff_effect()) {
|
||||||
|
case kBET_InRescue:
|
||||||
|
case kBET_Rescuer:
|
||||||
|
{
|
||||||
|
a8::XPrintf("remove jiuyuan role_name:%s type:%s buff_id:%d buff_effect:%\n",
|
||||||
|
{
|
||||||
|
owner->GetName(),
|
||||||
|
owner->IsPlayer() ? "player" : "android",
|
||||||
|
meta->buff_id(),
|
||||||
|
a8::GetEnumName<BuffEffectType_e>(meta->buff_effect())
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
list_del_init(&effect_entry);
|
list_del_init(&effect_entry);
|
||||||
if (!list_empty(&depend_entry)) {
|
if (!list_empty(&depend_entry)) {
|
||||||
list_del_init(&depend_entry);
|
list_del_init(&depend_entry);
|
||||||
|
@ -894,7 +894,7 @@ void Human::UpdateAction()
|
|||||||
break;
|
break;
|
||||||
case AT_Rescue:
|
case AT_Rescue:
|
||||||
{
|
{
|
||||||
RemoveBuffByEffectId(kBET_InRescue);
|
RemoveBuffByEffectId(kBET_Rescuer);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1807,7 +1807,7 @@ void Human::ProcUseItemAction()
|
|||||||
|
|
||||||
void Human::ProcReliveAction()
|
void Human::ProcReliveAction()
|
||||||
{
|
{
|
||||||
RemoveBuffByEffectId(kBET_Rescuer);
|
RemoveBuffByEffectId(kBET_InRescue);
|
||||||
Entity* entity = room->GetEntityByUniId(action_target_id);
|
Entity* entity = room->GetEntityByUniId(action_target_id);
|
||||||
if (!entity->IsEntityType(ET_Player)) {
|
if (!entity->IsEntityType(ET_Player)) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user