Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case -1://Ouvrir banque
- //Sauvagarde du perso et des item avant.
- SQLManager.SAVE_PERSONNAGE(perso,true);
- if(perso.getDeshonor() >= 1)
- {
- SocketManager.GAME_SEND_Im_PACKET(perso, "183");
- return;
- }
- int cost = perso.getBankCost();
- if(cost > 0)
- {
- long nKamas = perso.get_kamas() - cost;
- if (nKamas < 0)//Si le joueur n'a pas assez de kamas pour ouvrir la banque
- {
- long bankKamas = perso.getBankKamas();
- if(bankKamas >= nKamas)
- {
- perso.set_kamas( 0 ); //On puise l'entièreter des kamas du joueurs. Ankalike ?
- perso.setBankKamas(bankKamas-nKamas); //On modifie les kamas de la banque
- nKamas = 0; //How todo more crap? xd
- }else
- {
- SocketManager.GAME_SEND_MESSAGE_SERVER(perso, "10|"+cost);
- return;
- }
- }
- perso.set_kamas(nKamas);
- SocketManager.GAME_SEND_STATS_PACKET(perso);
- SocketManager.GAME_SEND_Im_PACKET(perso, "020;"+cost);
- }
- SocketManager.GAME_SEND_ECK_PACKET(perso.get_compte().getGameThread().get_out(), 5, "");
- SocketManager.GAME_SEND_EL_BANK_PACKET(perso);
- perso.set_away(true);
- perso.setInBank(true);
- break;
Advertisement
Add Comment
Please, Sign In to add comment