diff --git a/server/gameserver/ability.cc b/server/gameserver/ability.cc index 85be6b03..afcd5a02 100644 --- a/server/gameserver/ability.cc +++ b/server/gameserver/ability.cc @@ -498,3 +498,28 @@ float Ability::GetAttrRuduce(int attr_id) return 0.0f; } } + +void Ability::GMDelBaseAttr(int type, int attr_id, int idx) +{ + +} + +void Ability::GMClearBaseAttr(int type) +{ + +} + +void Ability::GMDelGrowAttr(int type, int attr_id, int idx) +{ + +} + +void Ability::GMClearGrowAttr(int type) +{ + +} + +std::vector Ability::GMShowAttrs() +{ + +} diff --git a/server/gameserver/ability.h b/server/gameserver/ability.h index 8e40cb7c..ec37b542 100644 --- a/server/gameserver/ability.h +++ b/server/gameserver/ability.h @@ -37,6 +37,12 @@ class Ability void RemoveAttrRuduce(AttrRuduceHandle handler); float GetAttrAddition(int attr_id); float GetAttrRuduce(int attr_id); + + void GMDelBaseAttr(int type, int attr_id, int idx); + void GMClearBaseAttr(int type); + void GMDelGrowAttr(int type, int attr_id, int idx); + void GMClearGrowAttr(int type); + std::vector GMShowAttrs(); private: void Clear(); void RecalcAttrAbs(int attr_id); diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index 8766207d..49296f45 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -166,6 +166,62 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg) room->DropItem(drop_pos.ToGlmVec3(), equip_meta->id(), 1, 1); } } + } else if (cmd == "add_base_attr") { + Creature* target = nullptr; + int type = 0; + int attr_id = 0; + float value = 0; + if (target) { + if (type == 1) { + target->GetAbility()->AddAttrAbs(attr_id, value); + } else { + target->GetAbility()->AddAttrRate(attr_id, value); + } + } + } else if (cmd == "del_base_attr") { + Creature* target = nullptr; + int type = 0; + int attr_id = 0; + int idx = 0; + if (target) { + target->GetAbility()->GMDelBaseAttr(type, attr_id, idx); + } + } else if (cmd == "clear_base_attr") { + Creature* target = nullptr; + int type = 0; + if (target) { + target->GetAbility()->GMClearBaseAttr(type); + } + } else if (cmd == "add_grow_attr") { + Creature* target = nullptr; + int type = 0; + int attr_id = 0; + float value = 0; + if (target) { + if (type == 1) { + target->GetAbility()->AddAttrAddition(attr_id, value); + } else { + target->GetAbility()->AddAttrRuduce(attr_id, value); + } + } + } else if (cmd == "del_grow_attr") { + Creature* target = nullptr; + int type = 0; + int attr_id = 0; + int idx = 0; + if (target) { + target->GetAbility()->GMDelGrowAttr(type, attr_id, idx); + } + } else if (cmd == "clear_grow_attr") { + Creature* target = nullptr; + int type = 0; + if (target) { + target->GetAbility()->GMClearGrowAttr(type); + } + } else if (cmd == "show_attrs") { + Creature* target = nullptr; + if (target) { + } } else if (cmd == "reset_skill" && cmds.size() >= 2) { int skill_id = a8::XValue(cmds[1]); Skill* skill = GetSkill(skill_id);