1
This commit is contained in:
parent
9805565612
commit
808c2f998a
@ -12,28 +12,6 @@ float Ability::GetAttrAbs(int attr_id)
|
|||||||
float attr_abs_val = GetBuffAttrAbs(attr_id);
|
float attr_abs_val = GetBuffAttrAbs(attr_id);
|
||||||
if (attr_id == kHAT_Atk || attr_id == kHAT_Def) {
|
if (attr_id == kHAT_Atk || attr_id == kHAT_Def) {
|
||||||
if (owner.Get()) {
|
if (owner.Get()) {
|
||||||
Buff* buff = owner.Get()->GetBuffByEffectId(kBET_Car);
|
|
||||||
if (buff) {
|
|
||||||
const mt::Equip* equip_meta = mt::Equip::GetById(buff->meta->_buff_param4);
|
|
||||||
if (equip_meta) {
|
|
||||||
switch (attr_id) {
|
|
||||||
case kHAT_Atk:
|
|
||||||
{
|
|
||||||
attr_abs_val += equip_meta->_atk;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case kHAT_Def:
|
|
||||||
{
|
|
||||||
attr_abs_val += equip_meta->def();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return attr_abs_val;
|
return attr_abs_val;
|
||||||
|
@ -358,26 +358,9 @@ void Buff::Activate()
|
|||||||
{
|
{
|
||||||
const mt::Buff* buff_meta = meta;
|
const mt::Buff* buff_meta = meta;
|
||||||
switch (meta->buff_effect()) {
|
switch (meta->buff_effect()) {
|
||||||
case kBET_Car:
|
|
||||||
case kBET_CrazyMode:
|
case kBET_CrazyMode:
|
||||||
{
|
{
|
||||||
owner->RecalcBuffAttr();
|
owner->RecalcBuffAttr();
|
||||||
if (meta->buff_effect() == kBET_Car) {
|
|
||||||
const mt::Equip* equip_meta = mt::Equip::GetById(meta->_buff_param4);
|
|
||||||
if (equip_meta &&
|
|
||||||
equip_meta->equip_type() == EQUIP_TYPE_CAR &&
|
|
||||||
equip_meta->equip_subtype() == 1
|
|
||||||
) {
|
|
||||||
const mt::Equip* spec_weapon_meta = mt::Equip::GetById(equip_meta->_int_param1);
|
|
||||||
if (spec_weapon_meta) {
|
|
||||||
owner->second_weapon.weapon_idx = 100;
|
|
||||||
owner->second_weapon.weapon_id = spec_weapon_meta->id();
|
|
||||||
owner->second_weapon.meta = spec_weapon_meta;
|
|
||||||
owner->second_weapon.Recalc();
|
|
||||||
owner->second_weapon.ammo = owner->second_weapon.GetClipVolume(owner);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -27,8 +27,7 @@ void TurnOverBuff::Activate()
|
|||||||
#endif
|
#endif
|
||||||
glm::vec3 old_dir = owner->GetMoveDir();
|
glm::vec3 old_dir = owner->GetMoveDir();
|
||||||
Position old_pos = owner->GetPos();
|
Position old_pos = owner->GetPos();
|
||||||
float distance =
|
float distance = phase->phase_param1.GetDouble();
|
||||||
owner->HasBuffEffect(kBET_Car) ? phase->phase_param1.GetDouble() * 1.5 : phase->phase_param1.GetDouble();
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
caster_.Get()->SendDebugMsg(a8::Format("ProTurnOver currTimes:%d last_pos:%d,%d curr_pos:%d,%d",
|
caster_.Get()->SendDebugMsg(a8::Format("ProTurnOver currTimes:%d last_pos:%d,%d curr_pos:%d,%d",
|
||||||
{
|
{
|
||||||
|
@ -598,8 +598,7 @@ void Creature::RecalcBuffAttr()
|
|||||||
ability_->Clear();
|
ability_->Clear();
|
||||||
bool need_refresh_hp = false;
|
bool need_refresh_hp = false;
|
||||||
for (auto& buff : buff_list_) {
|
for (auto& buff : buff_list_) {
|
||||||
if (buff->meta->buff_effect() == kBET_Car ||
|
if (buff->meta->buff_effect() == kBET_CrazyMode) {
|
||||||
buff->meta->buff_effect() == kBET_CrazyMode) {
|
|
||||||
int attr_type = (int)buff->meta->_buff_param1;
|
int attr_type = (int)buff->meta->_buff_param1;
|
||||||
int calc_type = (int)buff->meta->_buff_param2;
|
int calc_type = (int)buff->meta->_buff_param2;
|
||||||
if (IsValidHumanAttr(attr_type)) {
|
if (IsValidHumanAttr(attr_type)) {
|
||||||
|
@ -2907,10 +2907,7 @@ void Human::ProcLootWeapon(AddItemDTO& dto)
|
|||||||
weapon->ammo = 0;
|
weapon->ammo = 0;
|
||||||
weapon->meta = dto.item_meta;
|
weapon->meta = dto.item_meta;
|
||||||
weapon->Recalc();
|
weapon->Recalc();
|
||||||
if (HasBuffEffect(kBET_Car)) {
|
AutoLoadingBullet();
|
||||||
} else {
|
|
||||||
AutoLoadingBullet();
|
|
||||||
}
|
|
||||||
if (switch_gun) {
|
if (switch_gun) {
|
||||||
SetCurrWeapon(weapon);
|
SetCurrWeapon(weapon);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user