1
This commit is contained in:
parent
a29f8364f0
commit
0ff5409773
@ -282,7 +282,8 @@ void FrameEvent::AddWeaponAmmoChg(CreatureWeakPtr& sender)
|
|||||||
(
|
(
|
||||||
std::make_tuple(sender,
|
std::make_tuple(sender,
|
||||||
sender.Get()->GetCurrWeapon()->weapon_idx,
|
sender.Get()->GetCurrWeapon()->weapon_idx,
|
||||||
sender.Get()->GetCurrWeapon()->ammo
|
sender.Get()->GetCurrWeapon()->ammo,
|
||||||
|
sender.Get()->GetCurrWeapon()->GetClipVolume(sender.Get())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
int idx = room->frame_event_data->chged_weapon_ammo_.size() - 1;
|
int idx = room->frame_event_data->chged_weapon_ammo_.size() - 1;
|
||||||
|
@ -17,7 +17,7 @@ private:
|
|||||||
std::vector<std::tuple<CreatureWeakPtr, ::cs::MFEffectChg>> chged_effects_;
|
std::vector<std::tuple<CreatureWeakPtr, ::cs::MFEffectChg>> chged_effects_;
|
||||||
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_items_;
|
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_items_;
|
||||||
std::vector<CreatureWeakPtr> chged_bullet_nums_;
|
std::vector<CreatureWeakPtr> chged_bullet_nums_;
|
||||||
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_weapon_ammo_;
|
std::vector<std::tuple<CreatureWeakPtr, int, int, int>> chged_weapon_ammo_;
|
||||||
std::vector<CreatureWeakPtr> chged_hps_;
|
std::vector<CreatureWeakPtr> chged_hps_;
|
||||||
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_skillcds_;
|
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_skillcds_;
|
||||||
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_skill_curr_times_;
|
std::vector<std::tuple<CreatureWeakPtr, int, int>> chged_skill_curr_times_;
|
||||||
|
@ -542,6 +542,7 @@ void FrameMaker::SerializeChgedWeaponAmmo(cs::SMUpdate* msg, Room* room, Human*
|
|||||||
p->set_property_type(kPropWeaponAmmo);
|
p->set_property_type(kPropWeaponAmmo);
|
||||||
p->set_property_subtype(std::get<1>(tuple));
|
p->set_property_subtype(std::get<1>(tuple));
|
||||||
p->set_value(std::get<2>(tuple));
|
p->set_value(std::get<2>(tuple));
|
||||||
|
p->set_value2(std::get<3>(tuple));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1652,12 +1652,14 @@ void Player::UpdateThrowBomb()
|
|||||||
RemoveBuffByEffectId(kBET_Hide);
|
RemoveBuffByEffectId(kBET_Hide);
|
||||||
}
|
}
|
||||||
--weapon.ammo;
|
--weapon.ammo;
|
||||||
room->frame_event.AddPropChg
|
room->frame_event.AddPropChgEx
|
||||||
(
|
(
|
||||||
GetWeakPtrRef(),
|
GetWeakPtrRef(),
|
||||||
kPropWeaponAmmo,
|
kPropWeaponAmmo,
|
||||||
weapon.weapon_idx,
|
weapon.weapon_idx,
|
||||||
weapon.ammo,
|
weapon.ammo,
|
||||||
|
weapon.GetClipVolume(this),
|
||||||
|
0,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
glm::vec3 bomb_pos = glm::vec3(
|
glm::vec3 bomb_pos = glm::vec3(
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "creature.h"
|
#include "creature.h"
|
||||||
#include "battledatacontext.h"
|
#include "battledatacontext.h"
|
||||||
#include "pbutils.h"
|
#include "pbutils.h"
|
||||||
|
#include "human.h"
|
||||||
|
|
||||||
#include "mt/Equip.h"
|
#include "mt/Equip.h"
|
||||||
|
|
||||||
@ -27,7 +28,11 @@ int Weapon::GetClipVolume(Creature* c)
|
|||||||
if (c->GetBattleContext()) {
|
if (c->GetBattleContext()) {
|
||||||
return c->GetBattleContext()->GetClipVolume(c, this);
|
return c->GetBattleContext()->GetClipVolume(c, this);
|
||||||
} else {
|
} else {
|
||||||
return meta ? meta->clip_volume() :0;
|
if (c->IsHuman() && meta->_inventory_slot() > 0) {
|
||||||
|
return c->AsHuman()->GetVolume(meta->_inventory_slot());
|
||||||
|
} else {
|
||||||
|
return meta ? meta->clip_volume() :0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,9 +111,6 @@ message MFVec3
|
|||||||
/*
|
/*
|
||||||
property_type: 1 血量
|
property_type: 1 血量
|
||||||
property_type: 2 最大血量
|
property_type: 2 最大血量
|
||||||
property_type: 3 库存
|
|
||||||
property_subtype: 库存数组索引
|
|
||||||
valule: 当前数量
|
|
||||||
property_type: 4 技能cd时间(剩余时间)
|
property_type: 4 技能cd时间(剩余时间)
|
||||||
property_type: 5 技能cd时间(总时间)
|
property_type: 5 技能cd时间(总时间)
|
||||||
property_type: 6 载具剩余子弹数
|
property_type: 6 载具剩余子弹数
|
||||||
@ -123,9 +120,10 @@ message MFVec3
|
|||||||
property_type: 9 当前道具(目前只有伪装)
|
property_type: 9 当前道具(目前只有伪装)
|
||||||
property_subtype: 道具id
|
property_subtype: 道具id
|
||||||
valule: 当前数量(数量<=0时除)
|
valule: 当前数量(数量<=0时除)
|
||||||
property_type: 10 更新武器子弹数
|
property_type: 10 更新武器子弹数和弹夹上限
|
||||||
property_subtype: 武器索引
|
property_subtype: 武器索引
|
||||||
valule: 当前数量
|
valule: 当前数量
|
||||||
|
valule2: 当前弹夹上限
|
||||||
property_type: 11 载具
|
property_type: 11 载具
|
||||||
property_subtype: car_uniid
|
property_subtype: car_uniid
|
||||||
valule: seat
|
valule: seat
|
||||||
|
2
third_party/a8
vendored
2
third_party/a8
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 7bd146740195fbf3d0268fd873708f4ec2f56ab6
|
Subproject commit 592661bae5547a0c1675816595b803f902d83041
|
Loading…
x
Reference in New Issue
Block a user