Skip to content

Commit

Permalink
update weaponmodel damagetype
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Nov 14, 2024
1 parent 7689b90 commit 072d3c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions c-api/data/weapon_model_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct ClrWeaponModelInfo {
int32_t skillAbove50MaxAmmoMp = 0;
int32_t maxSkillMaxAmmoMp = 0;
int32_t bonusMaxAmmoMp = 0;
char* damageType = nullptr;

ClrWeaponModelInfo() = default;
ClrWeaponModelInfo(alt::WeaponModelInfo info) :
Expand Down Expand Up @@ -42,12 +43,17 @@ struct ClrWeaponModelInfo {
ammoModelName = new char[info.ammoModelName.length() + 1];
std::copy(info.ammoModelName.begin(), info.ammoModelName.end(), ammoModelName);
ammoModelName[info.ammoModelName.length()] = '\0';

damageType = new char[info.damageType.length() + 1];
std::copy(info.damageType.begin(), info.damageType.end(), damageType);
damageType[info.damageType.length()] = '\0';
}

~ClrWeaponModelInfo() {
delete[] name;
delete[] ammoType;
delete[] modelName;
delete[] ammoModelName;
delete[] damageType;
}
};
2 changes: 1 addition & 1 deletion cpp-sdk

0 comments on commit 072d3c7

Please sign in to comment.