1313
1414class FFAPvP extends TableBase
1515{
16- public const FFAPVP_INIT = 'userdataprovider.ffapvp.init ' ;
17- public const FFAPVP_REGISTER = 'userdataprovider.ffapvp.register ' ;
18- public const FFAPVP_UNREGISTER = 'userdataprovider.ffapvp.unregister ' ;
19- public const FFAPVP_GET = 'userdataprovider.ffapvp.get ' ;
20- public const FFAPVP_ADD_COUNT = 'userdataprovider.ffapvp.addcount ' ;
21- public const FFAPVP_GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill ' ;
22- public const FFAPVP_GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp ' ;
16+ public const INIT = 'userdataprovider.ffapvp.init ' ;
17+ public const REGISTER = 'userdataprovider.ffapvp.register ' ;
18+ public const UNREGISTER = 'userdataprovider.ffapvp.unregister ' ;
19+ public const GET = 'userdataprovider.ffapvp.get ' ;
20+ public const ADD_COUNT = 'userdataprovider.ffapvp.addcount ' ;
21+ public const GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill ' ;
22+ public const GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp ' ;
2323
2424 public function init (): void
2525 {
26- $ this ->connector ->executeGeneric (self ::FFAPVP_INIT );
26+ $ this ->connector ->executeGeneric (self ::INIT );
2727 }
2828
2929 /**
@@ -35,7 +35,7 @@ public function init(): void
3535 */
3636 public function register (IPLayer $ player , ?callable $ onInserted = null , ?callable $ onError = null ): void
3737 {
38- $ this ->connector ->executeInsert (self ::FFAPVP_REGISTER , [$ player ->getname ()], $ onInserted , $ onError );
38+ $ this ->connector ->executeInsert (self ::REGISTER , [$ player ->getname ()], $ onInserted , $ onError );
3939
4040 }
4141
@@ -48,7 +48,7 @@ public function register(IPLayer $player, ?callable $onInserted = null, ?callabl
4848 */
4949 public function unregister (IPLayer $ player , ?callable $ onSuccess = null , ?callable $ onError = null ): void
5050 {
51- $ this ->connector ->executeChange (self ::FFAPVP_UNREGISTER , [$ player ->getName ()], $ onSuccess , $ onError );
51+ $ this ->connector ->executeChange (self ::UNREGISTER , [$ player ->getName ()], $ onSuccess , $ onError );
5252 }
5353
5454 /**
@@ -60,7 +60,7 @@ public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callab
6060 */
6161 public function get (IPlayer $ player , callable $ onSuccess = null , ?callable $ onError = null ): void
6262 {
63- $ this ->connector ->executeSelect (self ::FFAPVP_GET , [$ player ->getName ()], $ onSuccess , $ onError );
63+ $ this ->connector ->executeSelect (self ::GET , [$ player ->getName ()], $ onSuccess , $ onError );
6464 }
6565
6666 /**
@@ -73,7 +73,7 @@ public function get(IPlayer $player, callable $onSuccess = null, ?callable $onEr
7373 */
7474 public function add (IPlayer $ player , int $ kill = 0 , int $ death = 0 , int $ exp = 0 )
7575 {
76- $ this ->connector ->executeChange (self ::FFAPVP_ADD_COUNT , [$ player ->getName (), $ kill , $ death , $ exp ]);
76+ $ this ->connector ->executeChange (self ::ADD_COUNT , [$ player ->getName (), $ kill , $ death , $ exp ]);
7777 }
7878
7979 /**
@@ -118,7 +118,7 @@ public function addExp(IPlayer $player,int $exp)
118118 */
119119 public function getRankingByKill (int $ limit , ?callable $ onSelect = null , ?callable $ onError = null ): void
120120 {
121- $ this ->connector ->executeSelect (self ::FFAPVP_GET_RANKING_BY_KILL , [$ limit ], $ onSelect , $ onError );
121+ $ this ->connector ->executeSelect (self ::GET_RANKING_BY_KILL , [$ limit ], $ onSelect , $ onError );
122122 }
123123
124124 /**
@@ -130,6 +130,6 @@ public function getRankingByKill(int $limit, ?callable $onSelect = null, ?callab
130130 */
131131 public function getRankingByExp (int $ limit , ?callable $ onSelect = null , ?callable $ onError = null ): void
132132 {
133- $ this ->connector ->executeSelect (self ::FFAPVP_GET_RANKING_BY_EXP , [$ limit ], $ onSelect , $ onError );
133+ $ this ->connector ->executeSelect (self ::GET_RANKING_BY_EXP , [$ limit ], $ onSelect , $ onError );
134134 }
135135}
0 commit comments