Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
78993b940e
@ -321,7 +321,7 @@ const (
|
|||||||
StarCoin = "starcoin" //星座币
|
StarCoin = "starcoin" //星座币
|
||||||
SociatyCoin = "guildcoin" //公会币
|
SociatyCoin = "guildcoin" //公会币
|
||||||
ArenaCoin = "arenacoin" //竞技场币
|
ArenaCoin = "arenacoin" //竞技场币
|
||||||
ResVit = "vit" // 体力
|
ResVit = "ps" // 体力
|
||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
Gold int32 = 1 //金币
|
Gold int32 = 1 //金币
|
||||||
|
@ -663,7 +663,7 @@ func (this *User) recoverUserVit(uid string) {
|
|||||||
total := u.Vit + yu
|
total := u.Vit + yu
|
||||||
if total <= pconf.PsCeiling {
|
if total <= pconf.PsCeiling {
|
||||||
if isession, ok := this.ModuleBase.GetUserSession(u.Uid); ok {
|
if isession, ok := this.ModuleBase.GetUserSession(u.Uid); ok {
|
||||||
if code := this.AddAttributeValue(isession, "vit", yu, false); code == pb.ErrorCode_Success {
|
if code := this.AddAttributeValue(isession, comm.ResVit, yu, false); code == pb.ErrorCode_Success {
|
||||||
update := map[string]interface{}{
|
update := map[string]interface{}{
|
||||||
"lastRecoverVitSec": cur,
|
"lastRecoverVitSec": cur,
|
||||||
}
|
}
|
||||||
@ -672,7 +672,7 @@ func (this *User) recoverUserVit(uid string) {
|
|||||||
&pb.UserVitChangedPush{Vit: total}, u.Uid); err != nil {
|
&pb.UserVitChangedPush{Vit: total}, u.Uid); err != nil {
|
||||||
this.Error("玩家体力变化 UserVitChangedPush推送失败",
|
this.Error("玩家体力变化 UserVitChangedPush推送失败",
|
||||||
log.Field{Key: "uid", Value: u.Uid},
|
log.Field{Key: "uid", Value: u.Uid},
|
||||||
log.Field{Key: "vit", Value: total},
|
log.Field{Key: comm.ResVit, Value: total},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -695,12 +695,12 @@ func (this *User) AddUserVit(session comm.IUserSession, add int32) (code pb.Erro
|
|||||||
|
|
||||||
changed := u.Vit + add
|
changed := u.Vit + add
|
||||||
if changed <= ggd.PsUl {
|
if changed <= ggd.PsUl {
|
||||||
if code = this.AddAttributeValue(session, "vit", add, false); code == pb.ErrorCode_Success {
|
if code = this.AddAttributeValue(session, comm.ResVit, add, false); code == pb.ErrorCode_Success {
|
||||||
if err := session.SendMsg(string(this.GetType()), "vitchanged",
|
if err := session.SendMsg(string(this.GetType()), "vitchanged",
|
||||||
&pb.UserVitChangedPush{Vit: changed}); err != nil {
|
&pb.UserVitChangedPush{Vit: changed}); err != nil {
|
||||||
this.Error("玩家体力变化 UserVitChangedPush推送失败",
|
this.Error("玩家体力变化 UserVitChangedPush推送失败",
|
||||||
log.Field{Key: "uid", Value: u.Uid},
|
log.Field{Key: "uid", Value: u.Uid},
|
||||||
log.Field{Key: "vit", Value: changed},
|
log.Field{Key: comm.ResVit, Value: changed},
|
||||||
)
|
)
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user