fix(fight): 完善boss技能37注释并修复技能48伤害计算逻辑 - 移除NewSeIdx_37.go中TODO注释,完善技能描述 - 修复NewSeIdx_48.go中技能48的伤害减免逻辑,统一使用Ctx().Category() - 优化modules/config/service/base.go中的缓存配置逻辑 ```
This commit is contained in:
@@ -5,8 +5,7 @@ import (
|
|||||||
"blazing/logic/service/fight/input"
|
"blazing/logic/service/fight/input"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 37. 自身 一次受到大于n 的伤害时直接将对方体力降至0;(a1: high 16, a2: low 16)
|
// 37. 自身 一次受到大于n 的伤害时直接将对方体力降至0;
|
||||||
// TODO: 实现自身 一次受到大于n 的伤害时直接将对方体力降至0;(a1: high 16, a2: low 16)的核心逻辑
|
|
||||||
type NewSel37 struct {
|
type NewSel37 struct {
|
||||||
NewSel0
|
NewSel0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ func (e *NewSel48) DamageDivEx(t *info.DamageZone) bool {
|
|||||||
attackCategory := int(e.Args()[0].IntPart())
|
attackCategory := int(e.Args()[0].IntPart())
|
||||||
switch attackCategory {
|
switch attackCategory {
|
||||||
case 1:
|
case 1:
|
||||||
if e.Ctx().SkillEntity.Category() == info.Category.PHYSICAL {
|
if e.Ctx().Category() == info.Category.PHYSICAL {
|
||||||
// 物理攻击无效
|
// 物理攻击无效
|
||||||
t.Damage = alpacadecimal.Zero
|
t.Damage = alpacadecimal.Zero
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if e.Ctx().SkillEntity.Category() == info.Category.SPECIAL {
|
if e.Ctx().Category() == info.Category.SPECIAL {
|
||||||
// 特殊攻击无效
|
// 特殊攻击无效
|
||||||
t.Damage = alpacadecimal.Zero
|
t.Damage = alpacadecimal.Zero
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,16 +15,19 @@ func dbm_enable(m cool.IModel) *gdb.Model {
|
|||||||
if cool.Config.ServerInfo.IsDebug == 0 {
|
if cool.Config.ServerInfo.IsDebug == 0 {
|
||||||
|
|
||||||
ret = ret.Cache(gdb.CacheOption{
|
ret = ret.Cache(gdb.CacheOption{
|
||||||
Force: false,
|
Force: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
func dbm_notenable(m cool.IModel) *gdb.Model {
|
func dbm_notenable(m cool.IModel) *gdb.Model {
|
||||||
ret := cool.DBM(m).Cache(gdb.CacheOption{
|
ret := cool.DBM(m)
|
||||||
Force: false,
|
if cool.Config.ServerInfo.IsDebug == 0 {
|
||||||
})
|
|
||||||
|
|
||||||
|
ret = ret.Cache(gdb.CacheOption{
|
||||||
|
Force: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
func dbm_nocache(m cool.IModel) *gdb.Model {
|
func dbm_nocache(m cool.IModel) *gdb.Model {
|
||||||
|
|||||||
40
modules/player/model/fuchi.go
Normal file
40
modules/player/model/fuchi.go
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/cool"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 表名常量:修改为扶持平台日志表
|
||||||
|
const TableNamePlayerSupportLog = "player_support_log"
|
||||||
|
|
||||||
|
// SupportLog 对应数据库表 player_support_log,用于记录扶持平台的操作日志
|
||||||
|
// 核心记录:发起者、扶持数量、接收人
|
||||||
|
type SupportLog struct {
|
||||||
|
Base
|
||||||
|
InitiatorID uint64 `gorm:"not null;index:idx_support_log_by_initiator;comment:'发起扶持的玩家ID/管理员ID'" json:"initiator_id"`
|
||||||
|
SupportNum float64 `gorm:"not null;comment:'扶持的数量(如货币/道具数量)'" json:"support_num"`
|
||||||
|
RecipientID uint64 `gorm:"not null;index:idx_support_log_by_recipient;comment:'接收扶持的玩家ID'" json:"recipient_id"`
|
||||||
|
SupportType string `gorm:"size:50;default:'';comment:'扶持类型(如金豆/骄阳豆/道具,便于分类统计)'" json:"support_type"` // 扩展字段:可选
|
||||||
|
}
|
||||||
|
|
||||||
|
// TableName 返回表名
|
||||||
|
func (*SupportLog) TableName() string {
|
||||||
|
return TableNamePlayerSupportLog
|
||||||
|
}
|
||||||
|
|
||||||
|
// GroupName 返回表组名(保持原有逻辑)
|
||||||
|
func (*SupportLog) GroupName() string {
|
||||||
|
return "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewSupportLog 创建一个新的扶持日志记录
|
||||||
|
func NewSupportLog() *SupportLog {
|
||||||
|
return &SupportLog{
|
||||||
|
Base: *NewBase(), // 复用原有Base的创建逻辑(包含创建时间/更新时间等)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// init 程序启动时自动创建扶持日志表
|
||||||
|
func init() {
|
||||||
|
cool.CreateTable(&SupportLog{})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user