זה מה שחיפשתי אבל לא מצאתי
זה הכתובה איפה שזה נמצא
src\net\login\handler
פשי איזה לא מבין אני אשמח אם משהו יערוך לי את זה
קוד HTML:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.login.handler;
import client.Equip;
import client.Item;
import client.IItem;
import client.MapleCharacter;
import client.MapleClient;
import client.MapleInventory;
import client.MapleInventoryType;
import client.MapleSkinColor;
import net.AbstractMaplePacketHandler;
import tools.MaplePacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
import server.MapleItemInformationProvider;
public final class CreateCharHandler extends AbstractMaplePacketHandler {
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
String name = slea.readMapleAsciiString();
if (!MapleCharacter.canCreateChar(name)) {
return;
}
MapleCharacter newchar = MapleCharacter.getDefault(c);
newchar.setWorld(c.getWorld());
int face = slea.readInt();
newchar.setFace(face);
newchar.setHair(slea.readInt() + slea.readInt());
newchar.setSkinColor(MapleSkinColor.getById(slea.readInt()));
int top = slea.readInt();
int bottom = slea.readInt();
int shoes = slea.readInt();
int weapon = slea.readInt();
newchar.setGender(slea.readByte());
newchar.setName(name);
MapleInventory equip = newchar.getInventory(MapleInventoryType.EQUIPPED);
Equip eq_top = new Equip(top, (byte) -5, 7);
eq_top.setWdef((short) 3);
equip.addFromDB(eq_top.copy());
Equip eq_bottom = new Equip(bottom, (byte) -6, 7);
eq_bottom.setWdef((short) 2);
equip.addFromDB(eq_bottom.copy());
Equip eq_shoes = new Equip(shoes, (byte) -7, 7);
eq_shoes.setWdef((short) 2); //rite? o_O
equip.addFromDB(eq_shoes.copy());
Equip eq_weapon = new Equip(weapon, (byte) -11, 7);
eq_weapon.setWatk((short) 15);
equip.addFromDB(eq_weapon.copy());
IItem eq_Hat = MapleItemInformationProvider.getInstance().getEquipById(1002419);
eq_Hat.setPosition((byte) -1);
equip.addFromDB(eq_Hat.copy());
newchar.getInventory(MapleInventoryType.ETC).addItem(new Item(4161001, (byte) 0, (short) 1));
newchar.saveToDB(false);
c.getSession().write(MaplePacketCreator.addNewCharEntry(newchar));
}
}
אם אפשר להוסיף שעל איך שפותחים שחקן מקבלים את זה
1002516
1142000
את שני אלה,תודה