Fix location share

This commit is contained in:
Aslan 2026-01-23 09:04:02 -05:00
parent 5f45b3b4dc
commit 950afd5d10
2 changed files with 3 additions and 5 deletions

View file

@ -62,8 +62,8 @@ const existsEntity = (name: string): boolean => {
return existsPlayer(name) || existsNpc(name);
};
const getPlayer = (id: string): IPlayer => {
return getPlayerByName(getUserNameById(id));
const getPlayer = (userId: string): IPlayer => {
return getPlayerByName(getUserNameById(userId));
};
const getPlayerByName = (name: string): IPlayer => {
@ -80,7 +80,7 @@ const getPlayerByName = (name: string): IPlayer => {
const getEntityByName = (name: string): IPlayer | TFullNPC => {
if (existsPlayer(name)) {
return getPlayer(name);
return getPlayerByName(name);
}
const npc = getNpcByName(name);

View file

@ -78,8 +78,6 @@ const hasLocation = (
const entitiesShareLocation = (entityA: IEntity, entityB: IEntity): boolean => {
const locationA = getLocation(entityA.location);
const locationB = getLocation(entityB.location);
console.log(locationA.id);
console.log(locationB.id);
return locationA.id === locationB.id;
};