add player to petinfomsg
This commit is contained in:
parent
1008d2aa07
commit
4d4169c32d
@ -275,10 +275,10 @@ export class BattleHandler {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public onPlayerAddCard(aplayer: PlayerHandler, count: number, maxcount: number){
|
public onPlayerAddCard(aplayer: PlayerHandler, count: number, maxcount: number){
|
||||||
return this._room.addCard(aplayer._player.heroId + '', count, maxcount);
|
return this._room.addCard(aplayer.getId(), count, maxcount);
|
||||||
};
|
};
|
||||||
|
|
||||||
public onPlayerStealCard(srcplayer: PlayerHandler, dstplayer: PlayerHandler, count: number){
|
public onPlayerStealCard(srcplayer: PlayerHandler, dstplayer: PlayerHandler, count: number){
|
||||||
return this._room.drawCardFromPlayer(srcplayer._player.heroId + '', dstplayer._player.heroId + '', count);
|
return this._room.drawCardFromPlayer(srcplayer.getId(), dstplayer.getId(), count);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -170,6 +170,7 @@ export class PetHandler {
|
|||||||
ap: this._baseap,
|
ap: this._baseap,
|
||||||
extAp: this._exap,
|
extAp: this._exap,
|
||||||
pos: this._idx,
|
pos: this._idx,
|
||||||
|
player: this._owner.getId(),
|
||||||
harmReduce: this._exredhurt,
|
harmReduce: this._exredhurt,
|
||||||
skills: this._selfskills,
|
skills: this._selfskills,
|
||||||
extSkills: this._exskills
|
extSkills: this._exskills
|
||||||
|
@ -49,6 +49,10 @@ export class PlayerHandler {
|
|||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public getId(): string{
|
||||||
|
return this._player.heroId + '';
|
||||||
|
};
|
||||||
|
|
||||||
public newPet(): PetHandler {
|
public newPet(): PetHandler {
|
||||||
let res = null;
|
let res = null;
|
||||||
let pr = null;
|
let pr = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user