This commit is contained in:
aozhiwei 2023-07-04 15:43:45 +08:00
parent 90ae2edddd
commit 55c5b101ac
4 changed files with 44 additions and 19 deletions

View File

@ -426,7 +426,7 @@ void Car::DecHP(float dec_hp, int killer_id, const std::string killer_name, int
GetUniId(),
real_dmg_out,
0,
0,
killer->GetUniId(),
true);
} else if (killer->IsHero() &&
killer->AsHero()->master.Get() &&
@ -438,7 +438,7 @@ void Car::DecHP(float dec_hp, int killer_id, const std::string killer_name, int
GetUniId(),
real_dmg_out,
0,
0,
killer->AsHero()->master.Get()->GetUniId(),
true);
}
}

View File

@ -295,7 +295,7 @@ void Hero::DecHP(float dec_hp, int killer_id, const std::string killer_name, int
GetUniId(),
real_dmg_out,
0,
0,
killer->GetUniId(),
true);
} else if (killer->IsHero() &&
killer->AsHero()->master.Get() &&
@ -307,7 +307,7 @@ void Hero::DecHP(float dec_hp, int killer_id, const std::string killer_name, int
GetUniId(),
real_dmg_out,
0,
0,
killer->AsHero()->master.Get()->GetUniId(),
true);
}
}

View File

@ -363,7 +363,7 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, in
}
Creature* killer = room->GetCreatureByUniId(real_killer_id);
if (killer && real_dmg_out > 0.999) {
if (killer->IsPlayer()) {
if (killer->IsHuman()) {
room->frame_event.AddPropChgEx
(
killer->GetWeakPtrRef(),
@ -371,20 +371,44 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, in
GetUniId(),
real_dmg_out,
0,
0,
true);
} else if (killer->IsHero() &&
killer->AsHero()->master.Get() &&
killer->AsHero()->master.Get()->IsPlayer()) {
room->frame_event.AddPropChgEx
(
killer->AsHero()->master.Get()->GetWeakPtrRef(),
kPropDmgShow,
GetUniId(),
real_dmg_out,
0,
0,
killer->GetUniId(),
true);
if (IsPlayer()) {
room->frame_event.AddPropChgEx
(
GetWeakPtrRef(),
kPropDmgShow,
GetUniId(),
real_dmg_out,
0,
killer->GetUniId(),
true);
}
} else if (killer->IsHero()) {
if (killer->AsHero()->master.Get() &&
killer->AsHero()->master.Get()->IsPlayer()) {
room->frame_event.AddPropChgEx
(
killer->AsHero()->master.Get()->GetWeakPtrRef(),
kPropDmgShow,
GetUniId(),
real_dmg_out,
0,
killer->AsHero()->master.Get()->GetUniId(),
true);
}
if (IsPlayer()) {
room->frame_event.AddPropChgEx
(
GetWeakPtrRef(),
kPropDmgShow,
GetUniId(),
real_dmg_out,
0,
killer->AsHero()->master.Get() ?
killer->AsHero()->master.Get()->GetUniId() : killer->GetUniId(),
true);
}
}
}
GetTrigger()->HpChg();

View File

@ -230,9 +230,10 @@ message MFVec3
property_type: 50 ()
value:
property_type: 51
property_subtype: uniid
property_subtype: uniid
value:
value2: 0: 1
value3: uniid
*/
message MFPropertyChg
{