Skill Ammo requirement fixes

* Fixes #4589.
* Resolves an issue with the skill converter outputting the incorrect ammo type requirement.
* Also fixes an issue with physically attacking targets while having a status option active.
Thanks to @mazvi!
This commit is contained in:
aleos
2020-02-01 16:06:13 -05:00
parent 6f9c931efe
commit 7bdfe81867
4 changed files with 59 additions and 475 deletions

View File

@@ -2140,13 +2140,12 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
int temp = it_req->second.ammo;
for (int i = 1; i < MAX_AMMO_TYPE; i++) {
if (temp & i) {
if (temp & 1 << i) {
constant = constant_lookup(i, "A_");
constant.erase(0, 2);
body << YAML::Key << name2Upper(constant) << YAML::Value << "true";
temp ^= 1 << i;
}
temp ^= 1 << i;
}
body << YAML::EndMap;