playroom每日任务解锁等级
This commit is contained in:
parent
9529e48a52
commit
f4eb4d0371
@ -220,6 +220,14 @@ func GetInteractUnlock() int {
|
|||||||
return gamedata.GetIntValue(data, "Value")
|
return gamedata.GetIntValue(data, "Value")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetRoomDailyTaskUnlock() int {
|
||||||
|
data, err := gamedata.GetDataByKey(CFG_PLAYROOM_CONST, "RoomDailyTaskUnlock")
|
||||||
|
if err != nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return gamedata.GetIntValue(data, "Value")
|
||||||
|
}
|
||||||
|
|
||||||
func GetVisitorItem() int {
|
func GetVisitorItem() int {
|
||||||
data, err := gamedata.GetDataByKey(CFG_PLAYROOM_CONST, "VisitorItem")
|
data, err := gamedata.GetDataByKey(CFG_PLAYROOM_CONST, "VisitorItem")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -327,9 +327,13 @@ func (p *PlayroomMod) InitDailyTask() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlayroomMod) QuestTrigger(tr *quest.Trigger) bool {
|
func (p *PlayroomMod) QuestTrigger(tr *quest.Trigger, lv int) bool {
|
||||||
update := false
|
update := false
|
||||||
unlock := true
|
unlock := true
|
||||||
|
dailyTaskUnlockLv := playroomCfg.GetRoomDailyTaskUnlock()
|
||||||
|
if lv < dailyTaskUnlockLv {
|
||||||
|
return false
|
||||||
|
}
|
||||||
for k, v := range p.DailyTask {
|
for k, v := range p.DailyTask {
|
||||||
if !v.UnLock {
|
if !v.UnLock {
|
||||||
continue
|
continue
|
||||||
|
|||||||
@ -182,6 +182,7 @@ func (p *Player) ProcessTrigger() {
|
|||||||
MailMod := p.PlayMod.getMailMod()
|
MailMod := p.PlayMod.getMailMod()
|
||||||
PlayroomMod := p.PlayMod.getPlayroomMod()
|
PlayroomMod := p.PlayMod.getPlayroomMod()
|
||||||
GuideTaskMod := p.PlayMod.getGuideTaskMod()
|
GuideTaskMod := p.PlayMod.getGuideTaskMod()
|
||||||
|
BaseMod := p.PlayMod.getBaseMod()
|
||||||
IsPlayroomBack := false
|
IsPlayroomBack := false
|
||||||
IsMailBack := false
|
IsMailBack := false
|
||||||
IsGuideTask := false
|
IsGuideTask := false
|
||||||
@ -192,7 +193,7 @@ func (p *Player) ProcessTrigger() {
|
|||||||
if p.MailTrigger(tr) {
|
if p.MailTrigger(tr) {
|
||||||
IsMailBack = true
|
IsMailBack = true
|
||||||
}
|
}
|
||||||
if PlayroomMod.QuestTrigger(tr) {
|
if PlayroomMod.QuestTrigger(tr, BaseMod.GetLevel()) {
|
||||||
IsPlayroomBack = true
|
IsPlayroomBack = true
|
||||||
}
|
}
|
||||||
if GuideTaskMod.Trigger(tr) {
|
if GuideTaskMod.Trigger(tr) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user