1
This commit is contained in:
parent
eeba9e17df
commit
6971503e32
@ -1298,12 +1298,25 @@ behaviac::EBTStatus HeroAgent::Pickup()
|
||||
if (owner_->dead) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
if (owner_->HasBuffEffect(kBET_Vertigo)) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
if (!PickupObjIsValid()) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
if (!owner_->IsHuman()) {
|
||||
return behaviac::BT_RUNNING;
|
||||
}
|
||||
if ((GetRoom()->GetFrameNo() - context->frameno) * FRAME_RATE_MS < pickup_time) {
|
||||
return behaviac::BT_RUNNING;
|
||||
}
|
||||
if (curr_pickup_obj_.Get()->IsLoot()) {
|
||||
Loot* loot = curr_pickup_obj_.Get()->AsLoot();
|
||||
owner_->AsHuman()->LootInteraction(loot);
|
||||
} else if (curr_pickup_obj_.Get()->IsRoomObstacle()) {
|
||||
RoomObstacle* ob = curr_pickup_obj_.Get()->AsRoomObstacle();
|
||||
owner_->AsHuman()->ObstacleInteraction(ob);
|
||||
}
|
||||
return behaviac::BT_SUCCESS;
|
||||
};
|
||||
return StartCoroutine(co);
|
||||
|
@ -2920,6 +2920,11 @@ void Human::LootInteraction(Loot* entity)
|
||||
}
|
||||
}
|
||||
|
||||
void Human::ObstacleInteraction(Obstacle* entity)
|
||||
{
|
||||
entity->DoInteraction(this);
|
||||
}
|
||||
|
||||
void Human::ProcAddItemDto(AddItemDTO& dto)
|
||||
{
|
||||
if (!dto.item_meta) {
|
||||
|
@ -266,6 +266,8 @@ class Human : public Creature
|
||||
void ShiledBreak();
|
||||
std::shared_ptr<Guide> GetGuide() { return guide_; };
|
||||
void SendNewBieEnd();
|
||||
void LootInteraction(Loot* entity);
|
||||
void ObstacleInteraction(Obstacle* entity);
|
||||
|
||||
protected:
|
||||
void ProcLootWeapon(AddItemDTO& dto);
|
||||
@ -285,7 +287,6 @@ protected:
|
||||
void ProcLoveItem(AddItemDTO& dto);
|
||||
void CancelRevive();
|
||||
Weapon* TakeonWeapon(const mt::Equip* equip_meta);
|
||||
void LootInteraction(Loot* entity);
|
||||
void ProcAddItemDto(AddItemDTO& dto);
|
||||
void DropWeapon(int weapon_idx, int num);
|
||||
|
||||
|
@ -819,11 +819,6 @@ void Player::ProcInteraction()
|
||||
}
|
||||
}
|
||||
|
||||
void Player::ObstacleInteraction(Obstacle* entity)
|
||||
{
|
||||
entity->DoInteraction(this);
|
||||
}
|
||||
|
||||
void Player::HumanInteraction(Human* hum)
|
||||
{
|
||||
if (downed) {
|
||||
|
@ -116,7 +116,6 @@ class Player : public Human
|
||||
void UpdateThrowBomb();
|
||||
void Shot();
|
||||
void ProcInteraction();
|
||||
void ObstacleInteraction(Obstacle* entity);
|
||||
void HumanInteraction(Human* hum);
|
||||
void ProcPreSettlementInfo(const std::string& pre_settlement_info);
|
||||
void ProcSkillList();
|
||||
|
Loading…
x
Reference in New Issue
Block a user