remove unused methods/imports
authorxangelo <git@xangelo.ca>
Thu, 22 Jun 2023 17:55:30 +0000 (13:55 -0400)
committerxangelo <git@xangelo.ca>
Thu, 22 Jun 2023 17:55:30 +0000 (13:55 -0400)
src/server/api.ts

index e353bde610269760d78bf92ea4a606b4ffdd7b16..1bb9ece3bcaaa355c56a178c35b638dfda64633d 100644 (file)
@@ -13,7 +13,7 @@ import { professionList } from '../shared/profession';
 import {clearFight, createFight, getMonsterList, loadMonster, loadMonsterFromFight, loadMonsterWithFaction, saveFightState} from './monster';
 import {FightRound} from '../shared/fight';
 import {addInventoryItem, deleteInventoryItem, getEquippedItems, getInventory, updateAp} from './inventory';
-import {Monster, MonsterForFight, MonsterForList} from '../shared/monsters';
+import {MonsterForFight} from '../shared/monsters';
 import {getShopItem } from './shopItem';
 import {EquippedItemDetails} from '../shared/equipped';
 import {ArmourEquipmentSlot, EquipmentSlot} from '../shared/inventory';
@@ -64,19 +64,6 @@ function setServerStats() {
   });
 }
 
-async function socketSendMonsterList(location_id: number, socket: Socket) {
-  const monsters: Monster[] = await getMonsterList(location_id);
-  let data: MonsterForList[] = monsters.map(monster => {
-    return {
-      id: monster.id,
-      name: monster.name,
-      level: monster.level
-    }
-  });
-
-  socket.emit('explore:fights', data);
-}
-
 setTimeout(setServerStats, 5000);
 
 io.on('connection', async socket => {