|
@@ -89,14 +89,14 @@ namespace CommonAI.ZoneServer.JSGModule
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- short finalWeightChg = GetWeightFinalValue(playerCardSkill, data.cardType, data);
|
|
|
+ int finalWeightChg = GetWeightFinalValue(playerCardSkill, data.cardType, data);
|
|
|
if (data.chgType == CardRateChgType.Add)
|
|
|
{
|
|
|
mCardWeightExt.AddWeight(data.cardType, finalWeightChg);
|
|
|
}
|
|
|
else if (data.chgType == CardRateChgType.Del)
|
|
|
{
|
|
|
- mCardWeightExt.AddWeight(data.cardType, (short)-finalWeightChg);
|
|
|
+ mCardWeightExt.AddWeight(data.cardType, -finalWeightChg);
|
|
|
}
|
|
|
else if (data.chgType == CardRateChgType.Set)
|
|
|
{
|
|
@@ -124,11 +124,11 @@ namespace CommonAI.ZoneServer.JSGModule
|
|
|
}
|
|
|
|
|
|
/** 获取牌珠实际权重变更值 */
|
|
|
- private short GetWeightFinalValue(CardSkillData[] playerCardSkill, CardType cardType, CardRateChgData data)
|
|
|
+ private int GetWeightFinalValue(CardSkillData[] playerCardSkill, CardType cardType, CardRateChgData data)
|
|
|
{
|
|
|
if (data.isPrecent)
|
|
|
{
|
|
|
- return (short)(CUtils.CastInt(data.value * XmdsUnitProp.PER * playerCardSkill[(int)cardType].weight));
|
|
|
+ return CUtils.CastInt(data.value * XmdsUnitProp.PER * playerCardSkill[(int)cardType].weight);
|
|
|
}
|
|
|
|
|
|
return data.value;
|
|
@@ -140,7 +140,7 @@ namespace CommonAI.ZoneServer.JSGModule
|
|
|
{
|
|
|
protected static Logger log = LoggerFactory.GetLogger("CardWeigthExt");
|
|
|
|
|
|
- protected short[] cardWeight = new short[(int)CardType.Max+1];
|
|
|
+ protected int[] cardWeight = new int[(int)CardType.Max+1];
|
|
|
private bool[] weightFlag = new bool[(int)CardType.Max+1]; // 是否设置概率
|
|
|
private int [] doubleRate = new int[(int)CardType.Max+1]; // 双球概率
|
|
|
|
|
@@ -164,7 +164,7 @@ namespace CommonAI.ZoneServer.JSGModule
|
|
|
return weightFlag[(int)type];
|
|
|
}
|
|
|
|
|
|
- public void AddWeight(CardType type, short value)
|
|
|
+ public void AddWeight(CardType type, int value)
|
|
|
{
|
|
|
this.cardWeight[(int)type] += value;
|
|
|
}
|
|
@@ -174,7 +174,7 @@ namespace CommonAI.ZoneServer.JSGModule
|
|
|
// return this.cardWeight[(int)type];
|
|
|
//}
|
|
|
|
|
|
- public void SetWeight(CardType type, short value)
|
|
|
+ public void SetWeight(CardType type, int value)
|
|
|
{
|
|
|
this.cardWeight[(int)type] = value;
|
|
|
this.weightFlag[(int)type] = true;
|