Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
d32f706c
Commit
d32f706c
authored
Apr 27, 2022
by
KingRainbow44
Browse files
Merge branch 'development' into api
# Conflicts: # src/main/java/emu/grasscutter/plugin/api/ServerHook.java
parents
47d8fd3c
f0d728b4
Changes
308
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketGetScenePointRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.GetScenePointRspOuterClass.GetScenePointRsp
;
import
emu.grasscutter.net.proto.GetScenePointRspOuterClass.GetScenePointRsp
;
public
class
PacketGetScenePointRsp
extends
Genshin
Packet
{
public
class
PacketGetScenePointRsp
extends
Base
Packet
{
public
PacketGetScenePointRsp
(
int
sceneId
)
{
public
PacketGetScenePointRsp
(
int
sceneId
)
{
super
(
PacketOpcodes
.
GetScenePointRsp
);
super
(
PacketOpcodes
.
GetScenePointRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetShopRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.shop.ShopInfo
;
import
emu.grasscutter.game.shop.ShopManager
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.GetShopRspOuterClass.GetShopRsp
;
import
emu.grasscutter.net.proto.GetShopRspOuterClass
;
import
emu.grasscutter.net.proto.ItemParamOuterClass
;
import
emu.grasscutter.net.proto.ShopGoodsOuterClass.ShopGoods
;
import
emu.grasscutter.net.proto.ShopOuterClass.Shop
;
import
emu.grasscutter.net.proto.ShopOuterClass.Shop
;
public
class
PacketGetShopRsp
extends
GenshinPacket
{
import
java.util.ArrayList
;
import
java.util.List
;
public
PacketGetShopRsp
(
int
shopType
)
{
import
java.util.stream.Collectors
;
public
class
PacketGetShopRsp
extends
BasePacket
{
public
PacketGetShopRsp
(
Player
inv
,
int
shopType
)
{
super
(
PacketOpcodes
.
GetShopRsp
);
super
(
PacketOpcodes
.
GetShopRsp
);
GetShopRsp
proto
=
GetShopRsp
.
newBuilder
()
// TODO: CityReputationLevel
.
setShop
(
Shop
.
newBuilder
().
setShopType
(
shopType
))
Shop
.
Builder
shop
=
Shop
.
newBuilder
()
.
build
();
.
setShopType
(
shopType
)
.
setCityId
(
1
)
//mock
this
.
setData
(
proto
);
.
setCityReputationLevel
(
10
);
//mock
ShopManager
manager
=
Grasscutter
.
getGameServer
().
getShopManager
();
if
(
manager
.
getShopData
().
get
(
shopType
)
!=
null
)
{
List
<
ShopInfo
>
list
=
manager
.
getShopData
().
get
(
shopType
);
List
<
ShopGoods
>
goodsList
=
new
ArrayList
<>();
for
(
ShopInfo
info
:
list
)
{
ShopGoods
.
Builder
goods
=
ShopGoods
.
newBuilder
()
.
setGoodsId
(
info
.
getGoodsId
())
.
setGoodsItem
(
ItemParamOuterClass
.
ItemParam
.
newBuilder
().
setItemId
(
info
.
getGoodsItem
().
getId
()).
setCount
(
info
.
getGoodsItem
().
getCount
()).
build
())
.
setScoin
(
info
.
getScoin
())
.
setHcoin
(
info
.
getHcoin
())
.
setBoughtNum
(
inv
.
getGoodsLimitNum
(
info
.
getGoodsId
()))
.
setBuyLimit
(
info
.
getBuyLimit
())
.
setBeginTime
(
info
.
getBeginTime
())
.
setEndTime
(
info
.
getEndTime
())
.
setNextRefreshTime
(
info
.
getNextRefreshTime
())
.
setMinLevel
(
info
.
getMinLevel
())
.
setMaxLevel
(
info
.
getMaxLevel
())
.
addAllPreGoodsIdList
(
info
.
getPreGoodsIdList
())
.
setMcoin
(
info
.
getMcoin
())
.
setDisableType
(
info
.
getDisableType
())
.
setSecondarySheetId
(
info
.
getSecondarySheetId
());
if
(
info
.
getCostItemList
()
!=
null
)
{
goods
.
addAllCostItemList
(
info
.
getCostItemList
().
stream
().
map
(
x
->
ItemParamOuterClass
.
ItemParam
.
newBuilder
().
setItemId
(
x
.
getId
()).
setCount
(
x
.
getCount
()).
build
()).
collect
(
Collectors
.
toList
()));
}
goodsList
.
add
(
goods
.
build
());
}
shop
.
addAllGoodsList
(
goodsList
);
}
this
.
setData
(
GetShopRspOuterClass
.
GetShopRsp
.
newBuilder
().
setShop
(
shop
).
build
());
}
}
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketGetShopmallDataRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.GetShopmallDataRspOuterClass.GetShopmallDataRsp
;
import
emu.grasscutter.net.proto.GetShopmallDataRspOuterClass.GetShopmallDataRsp
;
public
class
PacketGetShopmallDataRsp
extends
Genshin
Packet
{
public
class
PacketGetShopmallDataRsp
extends
Base
Packet
{
public
PacketGetShopmallDataRsp
()
{
public
PacketGetShopmallDataRsp
()
{
super
(
PacketOpcodes
.
GetShopmallDataRsp
);
super
(
PacketOpcodes
.
GetShopmallDataRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetWorldMpInfoRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.game.
world.
World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.GetWorldMpInfoRspOuterClass.GetWorldMpInfoRsp
;
import
emu.grasscutter.net.proto.GetWorldMpInfoRspOuterClass.GetWorldMpInfoRsp
;
public
class
PacketGetWorldMpInfoRsp
extends
Genshin
Packet
{
public
class
PacketGetWorldMpInfoRsp
extends
Base
Packet
{
public
PacketGetWorldMpInfoRsp
(
World
world
)
{
public
PacketGetWorldMpInfoRsp
(
World
world
)
{
super
(
PacketOpcodes
.
GetWorldMpInfoRsp
);
super
(
PacketOpcodes
.
GetWorldMpInfoRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketH5ActivityIdsNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.H5ActivityIdsNotifyOuterClass.H5ActivityIdsNotify
;
import
emu.grasscutter.net.proto.H5ActivityIdsNotifyOuterClass.H5ActivityIdsNotify
;
public
class
PacketH5ActivityIdsNotify
extends
Genshin
Packet
{
public
class
PacketH5ActivityIdsNotify
extends
Base
Packet
{
public
PacketH5ActivityIdsNotify
()
{
public
PacketH5ActivityIdsNotify
()
{
super
(
PacketOpcodes
.
H5ActivityIdsNotify
);
super
(
PacketOpcodes
.
H5ActivityIdsNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketHostPlayerNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.game.
world.
World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.HostPlayerNotifyOuterClass.HostPlayerNotify
;
import
emu.grasscutter.net.proto.HostPlayerNotifyOuterClass.HostPlayerNotify
;
public
class
PacketHostPlayerNotify
extends
Genshin
Packet
{
public
class
PacketHostPlayerNotify
extends
Base
Packet
{
public
PacketHostPlayerNotify
(
World
world
)
{
public
PacketHostPlayerNotify
(
World
world
)
{
super
(
PacketOpcodes
.
HostPlayerNotify
);
super
(
PacketOpcodes
.
HostPlayerNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketItemAddHintNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
import
emu.grasscutter.game.inventory.G
enshin
Item
;
import
emu.grasscutter.game.inventory.G
ame
Item
;
import
emu.grasscutter.game.props.ActionReason
;
import
emu.grasscutter.game.props.ActionReason
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ItemAddHintNotifyOuterClass.ItemAddHintNotify
;
import
emu.grasscutter.net.proto.ItemAddHintNotifyOuterClass.ItemAddHintNotify
;
public
class
PacketItemAddHintNotify
extends
Genshin
Packet
{
public
class
PacketItemAddHintNotify
extends
Base
Packet
{
public
PacketItemAddHintNotify
(
G
enshin
Item
item
,
ActionReason
reason
)
{
public
PacketItemAddHintNotify
(
G
ame
Item
item
,
ActionReason
reason
)
{
super
(
PacketOpcodes
.
ItemAddHintNotify
);
super
(
PacketOpcodes
.
ItemAddHintNotify
);
ItemAddHintNotify
proto
=
ItemAddHintNotify
.
newBuilder
()
ItemAddHintNotify
proto
=
ItemAddHintNotify
.
newBuilder
()
...
@@ -21,13 +22,13 @@ public class PacketItemAddHintNotify extends GenshinPacket {
...
@@ -21,13 +22,13 @@ public class PacketItemAddHintNotify extends GenshinPacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketItemAddHintNotify
(
List
<
Genshin
Item
>
items
,
ActionReason
reason
)
{
public
PacketItemAddHintNotify
(
Collection
<
Game
Item
>
items
,
ActionReason
reason
)
{
super
(
PacketOpcodes
.
ItemAddHintNotify
);
super
(
PacketOpcodes
.
ItemAddHintNotify
);
ItemAddHintNotify
.
Builder
proto
=
ItemAddHintNotify
.
newBuilder
()
ItemAddHintNotify
.
Builder
proto
=
ItemAddHintNotify
.
newBuilder
()
.
setReason
(
reason
.
getValue
());
.
setReason
(
reason
.
getValue
());
for
(
G
enshin
Item
item
:
items
)
{
for
(
G
ame
Item
item
:
items
)
{
proto
.
addItemList
(
item
.
toItemHintProto
());
proto
.
addItemList
(
item
.
toItemHintProto
());
}
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketLifeStateChangeNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.entity.G
enshin
Entity
;
import
emu.grasscutter.game.entity.G
ame
Entity
;
import
emu.grasscutter.game.props.LifeState
;
import
emu.grasscutter.game.props.LifeState
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.LifeStateChangeNotifyOuterClass.LifeStateChangeNotify
;
import
emu.grasscutter.net.proto.LifeStateChangeNotifyOuterClass.LifeStateChangeNotify
;
public
class
PacketLifeStateChangeNotify
extends
Genshin
Packet
{
public
class
PacketLifeStateChangeNotify
extends
Base
Packet
{
public
PacketLifeStateChangeNotify
(
G
enshin
Entity
attacker
,
G
enshin
Entity
target
,
LifeState
lifeState
)
{
public
PacketLifeStateChangeNotify
(
G
ame
Entity
attacker
,
G
ame
Entity
target
,
LifeState
lifeState
)
{
super
(
PacketOpcodes
.
LifeStateChangeNotify
);
super
(
PacketOpcodes
.
LifeStateChangeNotify
);
LifeStateChangeNotify
proto
=
LifeStateChangeNotify
.
newBuilder
()
LifeStateChangeNotify
proto
=
LifeStateChangeNotify
.
newBuilder
()
...
@@ -18,7 +18,7 @@ public class PacketLifeStateChangeNotify extends GenshinPacket {
...
@@ -18,7 +18,7 @@ public class PacketLifeStateChangeNotify extends GenshinPacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketLifeStateChangeNotify
(
int
attackerId
,
G
enshin
Entity
target
,
LifeState
lifeState
)
{
public
PacketLifeStateChangeNotify
(
int
attackerId
,
G
ame
Entity
target
,
LifeState
lifeState
)
{
super
(
PacketOpcodes
.
LifeStateChangeNotify
);
super
(
PacketOpcodes
.
LifeStateChangeNotify
);
LifeStateChangeNotify
proto
=
LifeStateChangeNotify
.
newBuilder
()
LifeStateChangeNotify
proto
=
LifeStateChangeNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketMailChangeNotify.java
0 → 100644
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.game.mail.Mail
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.*
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PacketMailChangeNotify
extends
BasePacket
{
public
PacketMailChangeNotify
(
Player
player
,
Mail
message
)
{
this
(
player
,
new
ArrayList
<
Mail
>(){{
add
(
message
);}});
}
public
PacketMailChangeNotify
(
Player
player
,
List
<
Mail
>
mailList
)
{
this
(
player
,
mailList
,
null
);
}
public
PacketMailChangeNotify
(
Player
player
,
List
<
Mail
>
mailList
,
List
<
Integer
>
delMailIdList
)
{
super
(
PacketOpcodes
.
MailChangeNotify
);
MailChangeNotifyOuterClass
.
MailChangeNotify
.
Builder
proto
=
MailChangeNotifyOuterClass
.
MailChangeNotify
.
newBuilder
();
if
(
mailList
!=
null
)
{
for
(
Mail
message
:
mailList
)
{
MailTextContentOuterClass
.
MailTextContent
.
Builder
mailTextContent
=
MailTextContentOuterClass
.
MailTextContent
.
newBuilder
();
mailTextContent
.
setTitle
(
message
.
mailContent
.
title
);
mailTextContent
.
setContent
(
message
.
mailContent
.
content
);
mailTextContent
.
setSender
(
message
.
mailContent
.
sender
);
List
<
MailItemOuterClass
.
MailItem
>
mailItems
=
new
ArrayList
<
MailItemOuterClass
.
MailItem
>();
for
(
Mail
.
MailItem
item
:
message
.
itemList
)
{
MailItemOuterClass
.
MailItem
.
Builder
mailItem
=
MailItemOuterClass
.
MailItem
.
newBuilder
();
ItemParamOuterClass
.
ItemParam
.
Builder
itemParam
=
ItemParamOuterClass
.
ItemParam
.
newBuilder
();
itemParam
.
setItemId
(
item
.
itemId
);
itemParam
.
setCount
(
item
.
itemCount
);
mailItem
.
setItemParam
(
itemParam
.
build
());
mailItems
.
add
(
mailItem
.
build
());
}
MailDataOuterClass
.
MailData
.
Builder
mailData
=
MailDataOuterClass
.
MailData
.
newBuilder
();
mailData
.
setMailId
(
player
.
getMailId
(
message
));
mailData
.
setMailTextContent
(
mailTextContent
.
build
());
mailData
.
addAllItemList
(
mailItems
);
mailData
.
setSendTime
((
int
)
message
.
sendTime
);
mailData
.
setExpireTime
((
int
)
message
.
expireTime
);
mailData
.
setImportance
(
message
.
importance
);
mailData
.
setIsRead
(
message
.
isRead
);
mailData
.
setIsAttachmentGot
(
message
.
isAttachmentGot
);
mailData
.
setStateValue
(
message
.
stateValue
);
proto
.
addMailList
(
mailData
.
build
());
}
}
if
(
delMailIdList
!=
null
)
{
proto
.
addAllDelMailIdList
(
delMailIdList
);
}
this
.
setData
(
proto
.
build
());
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/server/packet/send/PacketNpcTalkRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.NpcTalkRspOuterClass.NpcTalkRsp
;
import
emu.grasscutter.net.proto.NpcTalkRspOuterClass.NpcTalkRsp
;
public
class
PacketNpcTalkRsp
extends
Genshin
Packet
{
public
class
PacketNpcTalkRsp
extends
Base
Packet
{
public
PacketNpcTalkRsp
(
int
npcEntityId
,
int
curTalkId
,
int
entityId
)
{
public
PacketNpcTalkRsp
(
int
npcEntityId
,
int
curTalkId
,
int
entityId
)
{
super
(
PacketOpcodes
.
NpcTalkRsp
);
super
(
PacketOpcodes
.
NpcTalkRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketOpenStateUpdateNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.props.OpenState
;
import
emu.grasscutter.game.props.OpenState
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.OpenStateUpdateNotifyOuterClass.OpenStateUpdateNotify
;
import
emu.grasscutter.net.proto.OpenStateUpdateNotifyOuterClass.OpenStateUpdateNotify
;
public
class
PacketOpenStateUpdateNotify
extends
Genshin
Packet
{
public
class
PacketOpenStateUpdateNotify
extends
Base
Packet
{
public
PacketOpenStateUpdateNotify
()
{
public
PacketOpenStateUpdateNotify
()
{
super
(
PacketOpcodes
.
OpenStateUpdateNotify
);
super
(
PacketOpcodes
.
OpenStateUpdateNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPathfindingEnterSceneRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
public
class
PacketPathfindingEnterSceneRsp
extends
Genshin
Packet
{
public
class
PacketPathfindingEnterSceneRsp
extends
Base
Packet
{
public
PacketPathfindingEnterSceneRsp
(
int
clientSequence
)
{
public
PacketPathfindingEnterSceneRsp
(
int
clientSequence
)
{
super
(
PacketOpcodes
.
PathfindingEnterSceneRsp
);
super
(
PacketOpcodes
.
PathfindingEnterSceneRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPingRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PingRspOuterClass.PingRsp
;
import
emu.grasscutter.net.proto.PingRspOuterClass.PingRsp
;
public
class
PacketPingRsp
extends
Genshin
Packet
{
public
class
PacketPingRsp
extends
Base
Packet
{
public
PacketPingRsp
(
int
clientSeq
,
int
time
)
{
public
PacketPingRsp
(
int
clientSeq
,
int
time
)
{
super
(
PacketOpcodes
.
PingRsp
,
clientSeq
);
super
(
PacketOpcodes
.
PingRsp
,
clientSeq
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpNotifyOuterClass.PlayerApplyEnterMpNotify
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpNotifyOuterClass.PlayerApplyEnterMpNotify
;
public
class
PacketPlayerApplyEnterMpNotify
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpNotify
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpNotify
(
Genshin
Player
srcPlayer
)
{
public
PacketPlayerApplyEnterMpNotify
(
Player
srcPlayer
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpNotify
);
super
(
PacketOpcodes
.
PlayerApplyEnterMpNotify
);
PlayerApplyEnterMpNotify
proto
=
PlayerApplyEnterMpNotify
.
newBuilder
()
PlayerApplyEnterMpNotify
proto
=
PlayerApplyEnterMpNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpResultNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpReasonOuterClass.PlayerApplyEnterMpReason
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpReasonOuterClass.PlayerApplyEnterMpReason
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify
;
public
class
PacketPlayerApplyEnterMpResultNotify
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpResultNotify
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpResultNotify
(
Genshin
Player
target
,
boolean
isAgreed
,
PlayerApplyEnterMpReason
reason
)
{
public
PacketPlayerApplyEnterMpResultNotify
(
Player
target
,
boolean
isAgreed
,
PlayerApplyEnterMp
ResultNotifyOuterClass
.
PlayerApplyEnterMpResultNotify
.
Reason
reason
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
...
@@ -21,7 +22,7 @@ public class PacketPlayerApplyEnterMpResultNotify extends GenshinPacket {
...
@@ -21,7 +22,7 @@ public class PacketPlayerApplyEnterMpResultNotify extends GenshinPacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketPlayerApplyEnterMpResultNotify
(
int
targetId
,
String
targetName
,
boolean
isAgreed
,
PlayerApplyEnterMpReason
reason
)
{
public
PacketPlayerApplyEnterMpResultNotify
(
int
targetId
,
String
targetName
,
boolean
isAgreed
,
PlayerApplyEnterMp
ResultNotify
.
Reason
reason
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpResultRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultRspOuterClass.PlayerApplyEnterMpResultRsp
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultRspOuterClass.PlayerApplyEnterMpResultRsp
;
public
class
PacketPlayerApplyEnterMpResultRsp
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpResultRsp
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpResultRsp
(
int
applyUid
,
boolean
isAgreed
)
{
public
PacketPlayerApplyEnterMpResultRsp
(
int
applyUid
,
boolean
isAgreed
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultRsp
);
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpRspOuterClass.PlayerApplyEnterMpRsp
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpRspOuterClass.PlayerApplyEnterMpRsp
;
public
class
PacketPlayerApplyEnterMpRsp
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpRsp
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpRsp
(
int
targetUid
)
{
public
PacketPlayerApplyEnterMpRsp
(
int
targetUid
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpRsp
);
super
(
PacketOpcodes
.
PlayerApplyEnterMpRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerChatNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ChatInfoOuterClass.ChatInfo
;
import
emu.grasscutter.net.proto.ChatInfoOuterClass.ChatInfo
;
import
emu.grasscutter.net.proto.PlayerChatNotifyOuterClass.PlayerChatNotify
;
import
emu.grasscutter.net.proto.PlayerChatNotifyOuterClass.PlayerChatNotify
;
import
emu.grasscutter.net.proto.SystemHintOuterClass.SystemHint
;
import
emu.grasscutter.net.proto.SystemHintOuterClass.SystemHint
;
public
class
PacketPlayerChatNotify
extends
Genshin
Packet
{
public
class
PacketPlayerChatNotify
extends
Base
Packet
{
public
PacketPlayerChatNotify
(
Genshin
Player
sender
,
int
channelId
,
String
message
)
{
public
PacketPlayerChatNotify
(
Player
sender
,
int
channelId
,
String
message
)
{
super
(
PacketOpcodes
.
PlayerChatNotify
);
super
(
PacketOpcodes
.
PlayerChatNotify
);
ChatInfo
info
=
ChatInfo
.
newBuilder
()
ChatInfo
info
=
ChatInfo
.
newBuilder
()
...
@@ -26,7 +26,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
...
@@ -26,7 +26,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketPlayerChatNotify
(
Genshin
Player
sender
,
int
channelId
,
int
emote
)
{
public
PacketPlayerChatNotify
(
Player
sender
,
int
channelId
,
int
emote
)
{
super
(
PacketOpcodes
.
PlayerChatNotify
);
super
(
PacketOpcodes
.
PlayerChatNotify
);
ChatInfo
info
=
ChatInfo
.
newBuilder
()
ChatInfo
info
=
ChatInfo
.
newBuilder
()
...
@@ -43,7 +43,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
...
@@ -43,7 +43,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketPlayerChatNotify
(
Genshin
Player
sender
,
int
channelId
,
SystemHint
systemHint
)
{
public
PacketPlayerChatNotify
(
Player
sender
,
int
channelId
,
ChatInfo
.
SystemHint
systemHint
)
{
super
(
PacketOpcodes
.
PlayerChatNotify
);
super
(
PacketOpcodes
.
PlayerChatNotify
);
ChatInfo
info
=
ChatInfo
.
newBuilder
()
ChatInfo
info
=
ChatInfo
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerChatRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerChatRspOuterClass.PlayerChatRsp
;
import
emu.grasscutter.net.proto.PlayerChatRspOuterClass.PlayerChatRsp
;
public
class
PacketPlayerChatRsp
extends
Genshin
Packet
{
public
class
PacketPlayerChatRsp
extends
Base
Packet
{
public
PacketPlayerChatRsp
()
{
public
PacketPlayerChatRsp
()
{
super
(
PacketOpcodes
.
PlayerChatRsp
);
super
(
PacketOpcodes
.
PlayerChatRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerDataNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerDataNotifyOuterClass.PlayerDataNotify
;
import
emu.grasscutter.net.proto.PlayerDataNotifyOuterClass.PlayerDataNotify
;
import
emu.grasscutter.net.proto.PropValueOuterClass.PropValue
;
import
emu.grasscutter.net.proto.PropValueOuterClass.PropValue
;
public
class
PacketPlayerDataNotify
extends
Genshin
Packet
{
public
class
PacketPlayerDataNotify
extends
Base
Packet
{
public
PacketPlayerDataNotify
(
Genshin
Player
player
)
{
public
PacketPlayerDataNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
PlayerDataNotify
,
2
);
super
(
PacketOpcodes
.
PlayerDataNotify
,
2
);
PlayerDataNotify
.
Builder
p
=
PlayerDataNotify
.
newBuilder
()
PlayerDataNotify
.
Builder
p
=
PlayerDataNotify
.
newBuilder
()
.
setNickName
(
player
.
getNickname
())
.
setNickName
(
player
.
getNickname
())
.
set
Client
Time
(
System
.
currentTimeMillis
())
.
set
Server
Time
(
System
.
currentTimeMillis
())
.
setIsFirstLoginToday
(
true
)
.
setIsFirstLoginToday
(
true
)
.
setRegionId
(
player
.
getRegionId
());
.
setRegionId
(
player
.
getRegionId
());
...
...
Prev
1
…
8
9
10
11
12
13
14
15
16
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment