技能加速
This commit is contained in:
parent
2e7e015c6a
commit
59b0d13618
@ -719,6 +719,7 @@ void Human::DoSkill()
|
|||||||
{
|
{
|
||||||
accelerate_frameno_ = room->frame_no;
|
accelerate_frameno_ = room->frame_no;
|
||||||
a8::SetBitFlag(status, HS_Accelerate);
|
a8::SetBitFlag(status, HS_Accelerate);
|
||||||
|
buff.speed += skill_meta->i->value1();
|
||||||
room->xtimer.AddDeadLineTimerAndAttach(skill_meta->i->last_time() * SERVER_FRAME_RATE,
|
room->xtimer.AddDeadLineTimerAndAttach(skill_meta->i->last_time() * SERVER_FRAME_RATE,
|
||||||
a8::XParams()
|
a8::XParams()
|
||||||
.SetSender(this),
|
.SetSender(this),
|
||||||
@ -730,6 +731,7 @@ void Human::DoSkill()
|
|||||||
{
|
{
|
||||||
Human* hum = (Human*)param.sender.GetUserData();
|
Human* hum = (Human*)param.sender.GetUserData();
|
||||||
a8::UnSetBitFlag(hum->status, HS_Accelerate);
|
a8::UnSetBitFlag(hum->status, HS_Accelerate);
|
||||||
|
hum->buff.speed = 0.0f;
|
||||||
hum->need_sync_active_player = true;
|
hum->need_sync_active_player = true;
|
||||||
hum->BroadcastFullState();
|
hum->BroadcastFullState();
|
||||||
}
|
}
|
||||||
@ -1114,6 +1116,14 @@ void Human::RecalcVolume()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Human::RecalcBuff()
|
||||||
|
{
|
||||||
|
buff = HumanAbility();
|
||||||
|
if (skin_meta) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int Human::GetInventory(int slot_id)
|
int Human::GetInventory(int slot_id)
|
||||||
{
|
{
|
||||||
if (!IsValidSlotId(slot_id)) {
|
if (!IsValidSlotId(slot_id)) {
|
||||||
|
@ -150,6 +150,7 @@ class Human : public Entity
|
|||||||
bool CanSee(const Human* hum) const;
|
bool CanSee(const Human* hum) const;
|
||||||
void RecalcAttr();
|
void RecalcAttr();
|
||||||
void RecalcVolume();
|
void RecalcVolume();
|
||||||
|
void RecalcBuff();
|
||||||
int GetInventory(int slot_id);
|
int GetInventory(int slot_id);
|
||||||
void AddInventory(int slot_id, int num);
|
void AddInventory(int slot_id, int num);
|
||||||
void DecInventory(int slot_id, int num);
|
void DecInventory(int slot_id, int num);
|
||||||
|
@ -34,6 +34,7 @@ void Player::Initialize()
|
|||||||
} else {
|
} else {
|
||||||
skill_meta = nullptr;
|
skill_meta = nullptr;
|
||||||
}
|
}
|
||||||
|
RecalcBuff();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::Update(int delta_time)
|
void Player::Update(int delta_time)
|
||||||
@ -672,6 +673,7 @@ void Player::LootInteraction(Loot* entity)
|
|||||||
} else {
|
} else {
|
||||||
skill_meta = nullptr;
|
skill_meta = nullptr;
|
||||||
}
|
}
|
||||||
|
RecalcBuff();
|
||||||
SyncAroundPlayers();
|
SyncAroundPlayers();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user