1
This commit is contained in:
parent
dbd5064c69
commit
5b98cb12c6
@ -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<std::string> Ability::GMShowAttrs()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -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<std::string> GMShowAttrs();
|
||||
private:
|
||||
void Clear();
|
||||
void RecalcAttrAbs(int attr_id);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user