diff --git a/common/constant.go b/common/constant.go index cd0ef39..52b6ddb 100644 --- a/common/constant.go +++ b/common/constant.go @@ -815,6 +815,7 @@ const PermitAdd = 0.2 // 典藏通行证赛季积分多加,百分比 const ( SkinGetAuto = 1 SkinGetItem = 2 + SkinGetVip = 3 ) const ( diff --git a/data/DB_PropExchange.dat b/data/DB_PropExchange.dat index 2907545..844793d 100644 Binary files a/data/DB_PropExchange.dat and b/data/DB_PropExchange.dat differ diff --git a/data/DB_Skin.dat b/data/DB_Skin.dat index 7e07383..db7652e 100644 Binary files a/data/DB_Skin.dat and b/data/DB_Skin.dat differ diff --git a/data/DB_Skin.json b/data/DB_Skin.json index cbf0da0..2556f1b 100644 --- a/data/DB_Skin.json +++ b/data/DB_Skin.json @@ -33,9 +33,9 @@ "SkinPic": "icon_300003", "SkinName": "活力-粉", "SkinType": "mg_02", - "UnlockType": 2, + "UnlockType": 3, "UnlockItem": { - "310003": 20 + "5": 0 }, "SkinSkillName": "活力满满", "SkinSkillIcon": "SkillIcon-30003", @@ -48,9 +48,9 @@ "SkinPic": "icon_300004", "SkinName": "活力-青", "SkinType": "mg_03", - "UnlockType": 2, + "UnlockType": 3, "UnlockItem": { - "310004": 20 + "2": 0 }, "SkinSkillName": "金币满满", "SkinSkillIcon": "SkillIcon-30004", diff --git a/data/DB_Task.dat b/data/DB_Task.dat index 423c86f..76cbd14 100644 Binary files a/data/DB_Task.dat and b/data/DB_Task.dat differ diff --git a/protocol/pets/pets.pb.go b/protocol/pets/pets.pb.go index 0467ff9..815c0f3 100644 --- a/protocol/pets/pets.pb.go +++ b/protocol/pets/pets.pb.go @@ -1396,6 +1396,8 @@ type SkinInfo struct { SkillValue int32 `protobuf:"varint,13,opt,name=SkillValue,proto3" json:"SkillValue,omitempty"` //技能属性值 SkillNextValue int32 `protobuf:"varint,14,opt,name=SkillNextValue,proto3" json:"SkillNextValue,omitempty"` //技能下一级属性值 SkillType int32 `protobuf:"varint,15,opt,name=SkillType,proto3" json:"SkillType,omitempty"` // 技能生效类型 0获得后生效 1穿戴生效 + UnLockType int32 `protobuf:"varint,16,opt,name=UnLockType,proto3" json:"UnLockType,omitempty"` // 解锁类型 0默认皮肤不用解锁 1自动解锁 2道具解锁 3vip等级解锁 + NeedVip int32 `protobuf:"varint,17,opt,name=NeedVip,proto3" json:"NeedVip,omitempty"` // 解锁需要的vip等级 } func (x *SkinInfo) Reset() { @@ -1535,6 +1537,20 @@ func (x *SkinInfo) GetSkillType() int32 { return 0 } +func (x *SkinInfo) GetUnLockType() int32 { + if x != nil { + return x.UnLockType + } + return 0 +} + +func (x *SkinInfo) GetNeedVip() int32 { + if x != nil { + return x.NeedVip + } + return 0 +} + //PACKET_CS_SKIN_INFO type CSSkinInfo struct { state protoimpl.MessageState @@ -2088,7 +2104,7 @@ var file_pets_proto_rawDesc = []byte{ 0x28, 0x05, 0x52, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x24, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x01, 0x4e, 0x22, 0xce, 0x03, 0x0a, 0x08, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, + 0x03, 0x52, 0x01, 0x4e, 0x22, 0x88, 0x04, 0x0a, 0x08, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x78, 0x4c, 0x65, @@ -2117,85 +2133,89 @@ var file_pets_proto_rawDesc = []byte{ 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4e, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x53, 0x6b, 0x69, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0x32, 0x0a, 0x0a, 0x53, 0x43, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x24, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x70, 0x65, 0x74, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x1b, 0x0a, 0x09, 0x43, 0x53, 0x53, 0x6b, 0x69, - 0x6e, 0x55, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x09, 0x53, 0x43, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x73, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, + 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x55, 0x6e, 0x4c, 0x6f, 0x63, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4e, 0x65, 0x65, 0x64, 0x56, 0x69, 0x70, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4e, 0x65, 0x65, 0x64, 0x56, 0x69, 0x70, 0x22, + 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x32, 0x0a, + 0x0a, 0x53, 0x43, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x05, 0x49, + 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x65, 0x74, + 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x22, 0x1b, 0x0a, 0x09, 0x43, 0x53, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x5d, + 0x0a, 0x09, 0x53, 0x43, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x07, 0x52, + 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, + 0x65, 0x74, 0x73, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x22, 0x1f, 0x0a, + 0x0d, 0x43, 0x53, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x61, + 0x0a, 0x0d, 0x53, 0x43, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, + 0x22, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x70, 0x65, 0x74, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x65, 0x74, 0x73, 0x2e, 0x4f, 0x70, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x22, 0x1e, 0x0a, 0x0c, 0x43, 0x53, 0x53, 0x4b, 0x69, 0x6e, 0x55, 0x6e, 0x4c, 0x6f, 0x63, + 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, + 0x64, 0x22, 0x70, 0x0a, 0x0c, 0x53, 0x43, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x6e, 0x4c, 0x6f, 0x63, + 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x65, 0x74, 0x73, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, - 0x6e, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x0d, 0x43, 0x53, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x0d, 0x53, 0x43, 0x53, 0x6b, 0x69, 0x6e, 0x55, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x65, 0x74, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x07, 0x52, 0x65, 0x74, - 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x65, 0x74, - 0x73, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, - 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x1e, 0x0a, 0x0c, 0x43, 0x53, 0x53, 0x4b, 0x69, - 0x6e, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x0c, 0x53, 0x43, 0x53, 0x6b, 0x69, - 0x6e, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x65, 0x74, 0x73, 0x2e, - 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52, 0x65, - 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x65, 0x74, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0xf7, 0x04, 0x0a, 0x0c, 0x50, 0x65, - 0x74, 0x73, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x41, - 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x59, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, - 0x00, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x52, - 0x4f, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xf6, 0x13, 0x12, 0x18, 0x0a, 0x13, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x49, 0x4e, - 0x46, 0x4f, 0x10, 0xf7, 0x13, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, - 0x43, 0x53, 0x5f, 0x50, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xf8, 0x13, 0x12, 0x17, - 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x45, 0x54, 0x5f, - 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xf9, 0x13, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x45, 0x54, 0x5f, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x53, - 0x54, 0x41, 0x52, 0x10, 0xfa, 0x13, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, - 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x53, - 0x54, 0x41, 0x52, 0x10, 0xfb, 0x13, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, - 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x45, 0x54, 0x5f, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x53, 0x54, - 0x41, 0x52, 0x10, 0xfc, 0x13, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, - 0x43, 0x53, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x50, 0x45, 0x54, 0x55, 0x53, 0x45, 0x4f, 0x50, 0x10, - 0xfd, 0x13, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, - 0x52, 0x4f, 0x4c, 0x45, 0x50, 0x45, 0x54, 0x55, 0x53, 0x45, 0x4f, 0x50, 0x10, 0xfe, 0x13, 0x12, - 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x52, 0x4f, 0x4c, - 0x45, 0x50, 0x45, 0x54, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0xff, 0x13, 0x12, 0x1c, 0x0a, - 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x50, - 0x45, 0x54, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x80, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x45, 0x54, 0x53, 0x4b, 0x49, 0x4c, - 0x4c, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x55, 0x50, 0x10, 0x81, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x45, 0x54, 0x53, 0x4b, 0x49, 0x4c, - 0x4c, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x55, 0x50, 0x10, 0x82, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x49, 0x4e, - 0x46, 0x4f, 0x10, 0x83, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, - 0x53, 0x43, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x84, 0x14, 0x12, - 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, 0x4b, 0x49, - 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x85, 0x14, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, - 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x86, - 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, - 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x10, 0x87, 0x14, 0x12, 0x1b, - 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x4b, 0x49, 0x4e, - 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x10, 0x88, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x4e, - 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x89, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, - 0x10, 0x8a, 0x14, 0x2a, 0x67, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, - 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, - 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, - 0x5f, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, - 0x50, 0x52, 0x43, 0x5f, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0x04, 0x42, 0x24, 0x5a, 0x22, - 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x70, 0x65, - 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x70, 0x65, 0x74, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, + 0x6e, 0x66, 0x6f, 0x2a, 0xf7, 0x04, 0x0a, 0x0c, 0x50, 0x65, 0x74, 0x73, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x49, 0x44, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, + 0x41, 0x4e, 0x44, 0x59, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x13, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x49, 0x4e, + 0x46, 0x4f, 0x10, 0xf6, 0x13, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xf7, 0x13, 0x12, + 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x45, 0x54, + 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xf8, 0x13, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, + 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xf9, + 0x13, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, + 0x45, 0x54, 0x5f, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x53, 0x54, 0x41, 0x52, 0x10, 0xfa, 0x13, + 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, + 0x4c, 0x45, 0x5f, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x53, 0x54, 0x41, 0x52, 0x10, 0xfb, 0x13, + 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x45, + 0x54, 0x5f, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x53, 0x54, 0x41, 0x52, 0x10, 0xfc, 0x13, 0x12, + 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x52, 0x4f, 0x4c, + 0x45, 0x50, 0x45, 0x54, 0x55, 0x53, 0x45, 0x4f, 0x50, 0x10, 0xfd, 0x13, 0x12, 0x1b, 0x0a, 0x16, + 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x50, 0x45, + 0x54, 0x55, 0x53, 0x45, 0x4f, 0x50, 0x10, 0xfe, 0x13, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x50, 0x45, 0x54, 0x55, 0x4e, + 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0xff, 0x13, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x50, 0x45, 0x54, 0x55, 0x4e, 0x4c, 0x4f, + 0x43, 0x4b, 0x10, 0x80, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x43, 0x53, 0x5f, 0x50, 0x45, 0x54, 0x53, 0x4b, 0x49, 0x4c, 0x4c, 0x4c, 0x45, 0x56, 0x45, 0x4c, + 0x55, 0x50, 0x10, 0x81, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x53, 0x43, 0x5f, 0x50, 0x45, 0x54, 0x53, 0x4b, 0x49, 0x4c, 0x4c, 0x4c, 0x45, 0x56, 0x45, 0x4c, + 0x55, 0x50, 0x10, 0x82, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x43, 0x53, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x83, 0x14, 0x12, + 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x4b, 0x49, + 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x84, 0x14, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x10, + 0x85, 0x14, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, + 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x86, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x50, + 0x47, 0x52, 0x41, 0x44, 0x45, 0x10, 0x87, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, + 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, + 0x44, 0x45, 0x10, 0x88, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x43, 0x53, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x89, + 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, + 0x4b, 0x49, 0x4e, 0x5f, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x8a, 0x14, 0x2a, 0x67, 0x0a, + 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, + 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, + 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4d, 0x61, 0x78, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x55, 0x6e, + 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0x04, 0x42, 0x24, 0x5a, 0x22, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, + 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x70, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protocol/pets/pets.proto b/protocol/pets/pets.proto index e51e80e..5a57d03 100644 --- a/protocol/pets/pets.proto +++ b/protocol/pets/pets.proto @@ -173,6 +173,8 @@ message SkinInfo{ int32 SkillValue = 13;//技能属性值 int32 SkillNextValue = 14;//技能下一级属性值 int32 SkillType = 15; // 技能生效类型 0获得后生效 1穿戴生效 + int32 UnLockType = 16; // 解锁类型 0默认皮肤不用解锁 1自动解锁 2道具解锁 3vip等级解锁 + int32 NeedVip = 17; // 解锁需要的vip等级 } //PACKET_CS_SKIN_INFO diff --git a/public b/public index 84def61..3a51b77 160000 --- a/public +++ b/public @@ -1 +1 @@ -Subproject commit 84def613235479511266c5e6f331d7e81ed5cde5 +Subproject commit 3a51b7723bc64108d82735b6f707500fc7b05f1b diff --git a/worldsrv/action_pets.go b/worldsrv/action_pets.go index c7d2407..c2aca90 100644 --- a/worldsrv/action_pets.go +++ b/worldsrv/action_pets.go @@ -576,28 +576,35 @@ func SkinUnLock(p *Player, id int32) (*pets.SkinInfo, pets.OpResultCode) { } var change []*Item - for _, v := range info.GetCost() { - e := BagMgrSingleton.GetItem(p.SnId, v.GetId()) - if e == nil || e.ItemNum < v.GetN() { - return nil, pets.OpResultCode_OPRC_NotEnough + if info.GetUnLockType() == common.SkinGetVip { + if p.VIP < info.GetNeedVip() { + logger.Logger.Errorf("CSSKinUnLock Unlock vip error") + return nil, pets.OpResultCode_OPRC_Error } - change = append(change, &Item{ - ItemId: v.GetId(), - ItemNum: -v.GetN(), + } else { + for _, v := range info.GetCost() { + e := BagMgrSingleton.GetItem(p.SnId, v.GetId()) + if e == nil || e.ItemNum < v.GetN() { + return nil, pets.OpResultCode_OPRC_NotEnough + } + change = append(change, &Item{ + ItemId: v.GetId(), + ItemNum: -v.GetN(), + }) + } + _, _, ok := BagMgrSingleton.AddItemsV2(&ItemParam{ + P: p, + Change: change, + Add: 0, + GainWay: common.GainWaySkinUnLock, + Operator: "system", + Remark: "皮肤解锁消耗", + noLog: false, }) - } - _, _, ok := BagMgrSingleton.AddItemsV2(&ItemParam{ - P: p, - Change: change, - Add: 0, - GainWay: common.GainWaySkinUnLock, - Operator: "system", - Remark: "皮肤解锁消耗", - noLog: false, - }) - if !ok { - logger.Logger.Errorf("CSSKinUnLock Unlock error") - return nil, pets.OpResultCode_OPRC_Error + if !ok { + logger.Logger.Errorf("CSSKinUnLock Unlock error") + return nil, pets.OpResultCode_OPRC_Error + } } p.Skin.ModUnlock[id] = 1 if p.Skin.Mod[id] == nil { diff --git a/worldsrv/petmgr.go b/worldsrv/petmgr.go index 2e2e279..ce09243 100644 --- a/worldsrv/petmgr.go +++ b/worldsrv/petmgr.go @@ -249,7 +249,7 @@ func (this *PetMgr) GetPetInfo(p *Player, modId int32) *pets.PetInfo { // 皮肤 func (this *PetMgr) GetSkinInfos(p *Player) []*pets.SkinInfo { var ret []*pets.SkinInfo - for _, v := range srvdata.PBDB_SkinMgr.Datas.GetArr() { + for _, v := range PlatformMgrSingleton.GetConfig(p.Platform).SkinConfig.GetItems() { ret = append(ret, this.GetSkinInfo(p, v.GetId())) } return ret @@ -264,14 +264,19 @@ func (this *PetMgr) GetSkinInfo(p *Player, id int32) *pets.SkinInfo { bag := BagMgrSingleton.GetBagInfo(p.SnId) level := p.Skin.ModUnlock[id] var unLockCost, cost, have []*pets.Item + var needVip int32 for k, v := range cfg.GetUnlockParam() { unLockCost = append(unLockCost, &pets.Item{ Id: k, N: v, }) + needVip = k } if level == 0 { cost = unLockCost + if cfg.GetUnlockType() == common.SkinGetVip { + cost = cost[:0] + } } else { for k, v := range PlatformMgrSingleton.GetSkinLevel(p.Platform, id, level+1).GetUpItem() { cost = append(cost, &pets.Item{ @@ -296,15 +301,19 @@ func (this *PetMgr) GetSkinInfo(p *Player, id int32) *pets.SkinInfo { use := unLock && p.Skin.ModId == id ret := &pets.SkinInfo{ - Id: id, - Level: level, - MaxLevel: PlatformMgrSingleton.GetSkinMaxLevel(p.Platform, id), - Cost: cost, - Have: have, - IsUsing: use, - IsUnlock: unLock, - IsUpgrade: cfg.GetIsUpgrade() == 1, - SkillType: cfg.GetSkillType(), + Id: id, + Level: level, + MaxLevel: PlatformMgrSingleton.GetSkinMaxLevel(p.Platform, id), + Cost: cost, + Have: have, + IsUsing: use, + IsUnlock: unLock, + IsUpgrade: cfg.GetIsUpgrade() == 1, + SkillType: cfg.GetSkillType(), + UnLockType: cfg.GetUnlockType(), + } + if cfg.GetUnlockType() == common.SkinGetVip { + ret.NeedVip = needVip } curLevel := PlatformMgrSingleton.GetSkinLevel(p.Platform, id, level) nextLevel := PlatformMgrSingleton.GetSkinLevel(p.Platform, id, level+1) @@ -350,6 +359,11 @@ func (this *PetMgr) CheckSkinRed(p *Player) { p.SendShowRed(hall_proto.ShowRedCode_Skin, v.Id, 1) continue } + // vip等级解锁 + if info.GetUnLockType() == common.SkinGetVip && p.VIP >= info.GetNeedVip() { + p.SendShowRed(hall_proto.ShowRedCode_Skin, v.Id, 1) + continue + } } // 升级 if info.GetIsUnlock() && info.GetLevel() < info.GetMaxLevel() && info.GetIsUpgrade() { diff --git a/xlsx/DB_Skin.xlsx b/xlsx/DB_Skin.xlsx index da4bf29..6b8a6dc 100644 Binary files a/xlsx/DB_Skin.xlsx and b/xlsx/DB_Skin.xlsx differ