dummy fix showing weapon

This commit is contained in:
NguyenVanDat
2025-11-04 14:17:05 +07:00
parent 12617a8ea3
commit acf01f0ba7
@@ -588,7 +588,7 @@ public abstract class CECPlayer : CECObject
int nRand = UnityEngine.Random.Range(0, 4);
string szAct = string.Empty;
// int weapon_type = GetShowingWeaponType();
int weapon_type = GetShowingWeaponType();
int nTime1 = 0, nTime2 = 0;
int iAction = (int)PLAYER_ACTION_TYPE.ACT_ATTACK_1 + nRand;
@@ -717,6 +717,9 @@ public abstract class CECPlayer : CECObject
public int GetShowingWeaponType()
{
//todo: mr Hoang should double check it
return 10;
int weapon_type = 0;
if (CanShowFashionWeapon((int)m_uAttackType, m_iFashionWeaponType) &&
m_aEquips[(int)IndexOfIteminEquipmentInventory.EQUIPIVTR_FASHION_WEAPON] != 0)
@@ -801,7 +804,7 @@ public abstract class CECPlayer : CECObject
BMLogger.LogError("CECPlayer::GetFashionConfig, Failed to load fashion weapon config");
return false;
}
int fashion_weapon_mask = (int)pConfig.Value.action_mask[fashion_weapon_type];
return (fashion_weapon_mask & (1 << GetWeaponType(weapon_type))) != 0;
}