邀请好友界面,Lily已经是玩家好友了,视为获得了已邀请了一位好友(后续添加其他NPC好友不计数)
This commit is contained in:
parent
0c56cbd224
commit
1cc633b5ac
@ -4198,6 +4198,10 @@ func ReqAddNpc(player *Player, buf []byte) error {
|
||||
proto.Unmarshal(buf, req)
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.SetNpc(int(req.NpcId))
|
||||
if len(FriendMod.Npc) == 1 { // 首次添加NPC 视为邀请好友成功
|
||||
InviteMod := player.PlayMod.getInviteMod()
|
||||
InviteMod.AddInvite(int(req.NpcId))
|
||||
}
|
||||
player.PlayMod.save()
|
||||
FriendListBackData(player)
|
||||
PlayroomMod := player.PlayMod.getPlayroomMod()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user