| | |
| | | import GameWorld
|
| | | import ChConfig
|
| | | import PlayerControl
|
| | | import IPY_GameWorld
|
| | | import ItemCommon
|
| | | import ShareDefine
|
| | | import PlayerFamily
|
| | | #------------------------------------------------------------------------------
|
| | |
|
| | |
|
| | |
| | | for moneyType, giveMoney in giveMoneyDict.items():
|
| | |
|
| | | giveTotalMoney = giveMoney * successCnt
|
| | | if moneyType == ShareDefine.TYPE_Price_Family_Contribution:
|
| | | PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, giveTotalMoney, True, ShareDefine.Def_AddFAVReason_UseItem, True)
|
| | | else:
|
| | | addDataDict = {"UseCount":successCnt, ChConfig.Def_Give_Reason_SonKey:itemID}
|
| | | PlayerControl.GiveMoney(curPlayer, moneyType, giveTotalMoney, ChConfig.Def_GiveMoney_UseItem, addDataDict)
|
| | | addDataDict = {"UseCount":successCnt, ChConfig.Def_Give_Reason_SonKey:itemID}
|
| | | PlayerControl.GiveMoney(curPlayer, moneyType, giveTotalMoney, ChConfig.Def_GiveMoney_UseItem, addDataDict)
|
| | |
|
| | | return True, successCnt
|
| | |
|
| | |
| | | # @remarks: 根据道具的效果ID获得需要给的金钱的类型 D找不到的话返回-1
|
| | | def GetAddMoneyType(curEff):
|
| | | curEffID = curEff.GetEffectID()
|
| | | if curEffID == ChConfig.Def_Effect_GivePlayerMoneySilver:
|
| | | return IPY_GameWorld.TYPE_Price_Silver_Money
|
| | | elif curEffID == ChConfig.Def_Effect_GivePlayerMoneyGift:
|
| | | return IPY_GameWorld.TYPE_Price_Gold_Paper
|
| | | elif curEffID == ChConfig.Def_Effect_GivePlayerMoneyGold:
|
| | | return IPY_GameWorld.TYPE_Price_Gold_Money
|
| | | elif curEffID == ChConfig.Def_Effect_GivePlayerSilverPaper:
|
| | | return IPY_GameWorld.TYPE_Price_Silver_Paper
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveHonor:
|
| | | return ShareDefine.TYPE_Price_Honor
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveRuneJH:
|
| | | return ShareDefine.TYPE_Price_Rune
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveRuneSplinters:
|
| | | return ShareDefine.TYPE_Price_RuneSplinters
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveFamilyActivity:
|
| | | return ShareDefine.TYPE_Price_FamilyActivity
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveFamilyContribution:
|
| | | return ShareDefine.TYPE_Price_Family_Contribution
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveRealmPoint:
|
| | | return ShareDefine.TYPE_Price_RealmPoint
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveSoulDust:
|
| | | return ShareDefine.TYPE_Price_SoulDust
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveSoulSplinters:
|
| | | return ShareDefine.TYPE_Price_SoulSplinters
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveSoulCore:
|
| | | return ShareDefine.TYPE_Price_SoulCore
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveTreasureScore:
|
| | | return ShareDefine.TYPE_Price_TreasureScore
|
| | | elif curEffID == ChConfig.Def_Effect_ItemGiveMoney:
|
| | | if curEffID == ChConfig.Def_Effect_ItemGiveMoney:
|
| | | return curEff.GetEffectValue(1)
|
| | | return -1
|
| | |
|