Fix resetting characters name color on meet command
This commit is contained in:
parent
4ca0629bf3
commit
987753c0f1
@ -20,7 +20,17 @@ export class Characters {
|
|||||||
return this.names[shortName];
|
return this.names[shortName];
|
||||||
}
|
}
|
||||||
|
|
||||||
public setName(shortName: string, fullName: string, color: number = Characters.DEFAULT_COLOR): boolean {
|
public setName(shortName: string, fullName: string): boolean {
|
||||||
|
if (shortName in this.names) {
|
||||||
|
const info = this.names[shortName];
|
||||||
|
info.name = fullName;
|
||||||
|
} else {
|
||||||
|
this.names[shortName] = new NameInfo(fullName, Characters.DEFAULT_COLOR);
|
||||||
|
}
|
||||||
|
return shortName in this.names;
|
||||||
|
}
|
||||||
|
|
||||||
|
public setNameW(shortName: string, fullName: string, color: number = Characters.DEFAULT_COLOR): boolean {
|
||||||
if (shortName in this.names) {
|
if (shortName in this.names) {
|
||||||
const info = this.names[shortName];
|
const info = this.names[shortName];
|
||||||
info.name = fullName;
|
info.name = fullName;
|
||||||
|
Loading…
Reference in New Issue
Block a user