root/trunk/AE-go_GameServer/src/com/aionemu/gameserver/services/PlayerService.java
| 1514 | 1521 | ||
|---|---|---|---|
19 | import java.sql.Timestamp; | 19 | import java.sql.Timestamp; |
20 | import java.util.List; | 20 | import java.util.List; |
21 | 21 | ||
22 | import org.apache.log4j.Logger; | ||
23 | |||
22 | import com.aionemu.commons.database.dao.DAOManager; | 24 | import com.aionemu.commons.database.dao.DAOManager; |
23 | import com.aionemu.gameserver.configs.main.CacheConfig; | 25 | import com.aionemu.gameserver.configs.main.CacheConfig; |
24 | import com.aionemu.gameserver.configs.main.GSConfig; | 26 | import com.aionemu.gameserver.configs.main.GSConfig; |
... | ... | ||
85 | */ | 87 | */ |
86 | public class PlayerService | 88 | public class PlayerService |
87 | { | 89 | { |
90 | private static final Logger log = Logger.getLogger(PlayerService.class); | ||
88 | private CacheMap<Integer, Player> playerCache = CacheMapFactory.createSoftCacheMap("Player", "player"); | 91 | private CacheMap<Integer, Player> playerCache = CacheMapFactory.createSoftCacheMap("Player", "player"); |
89 | 92 | ||
90 | private World world; | 93 | private World world; |
... | ... | ||
348 | */ | 351 | */ |
349 | public void playerLoggedIn(Player player) | 352 | public void playerLoggedIn(Player player) |
350 | { | 353 | { |
354 | log.info("Player logged in: " + player.getName()); | ||
351 | player.getCommonData().setOnline(true); | 355 | player.getCommonData().setOnline(true); |
352 | DAOManager.getDAO(PlayerDAO.class).onlinePlayer(player, true); | 356 | DAOManager.getDAO(PlayerDAO.class).onlinePlayer(player, true); |
353 | player.onLoggedIn(); | 357 | player.onLoggedIn(); |
... | ... | ||
365 | */ | 369 | */ |
366 | public void playerLoggedOut(final Player player) | 370 | public void playerLoggedOut(final Player player) |
367 | { | 371 | { |
372 | log.info("Player logged out: " + player.getName()); | ||
373 | |||
368 | player.onLoggedOut(); | 374 | player.onLoggedOut(); |
369 | 375 | | |
376 | player.getEffectController().removeAllEffects(); | ||
377 | | ||
370 | if(player.getLifeStats().isAlreadyDead()) | 378 | if(player.getLifeStats().isAlreadyDead()) |
371 | teleportService.moveToBindLocation(player, false); | 379 | teleportService.moveToBindLocation(player, false); |
372 | 380 |
Download diff