- Mesaj
- 173
- Çözümler
- 6
- Beğeni
- 44
- Puan
- 704
- Ticaret Puanı
- 0
Çözüldü - Başlangıç itemlerini Source üzerinden ayarlamak
Bu kodları efsunlu vermesi şeklinde uyarladım buildtte hata alıyorum yardımcı olurmusunuz?
Bu kodları efsunlu vermesi şeklinde uyarladım buildtte hata alıyorum yardımcı olurmusunuz?
C++:
//baslangic item verme
t.owner = r_Tab.players[pPacketDB->bAccountCharacterIndex].dwID;
struct SInitialItem
{
BYTE window;
BYTE pos;
DWORD count;
DWORD dwVnum;
long socket0;
long socket1;
long socket2;
BYTE bType;
int sValue;
};
const int MAX_INITIAL_ITEM = 10;
static SInitialItem initialItems[JOB_MAX_NUM][MAX_INITIAL_ITEM] =
{
// {window_type, envanterdeki yeri, adeti, item_vnum, socket0, socket1, socket2, efsunadı0, efsunoranı0, efsunadı1, efsunoranı1, efsunadı2, efsunoranı2, efsunadı3, efsunoranı3, efsunadı4, efsunoranı4}
{
// WARRIOR
{EQUIPMENT, 0, 1, 11209, 28441, 0, 0, APPLY_MAX_HP, 3000, APPLY_CAST_SPEED, 20, APPLY_STEAL_HP, 10, APPLY_DODGE, 10, APPLY_ATT_GRADE_BONUS, 50}, // Zirh
{EQUIPMENT, 1, 1, 12207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Bilezik
{EQUIPMENT, 4, 1, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Silah
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kolye
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kupe
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kalkan
{INVENTORY, 0, 1, 50187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //Cirak sandigi
},
{
// ASSASSIN
{EQUIPMENT, 0, 1, 11207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Bilezik
{EQUIPMENT, 4, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Silah
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kolye
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kupe
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kalkan
{INVENTORY, 0, 1, 50187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //Cirak sandigi
},
{
// SURA
{EQUIPMENT, 0, 1, 11207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Bilezik
{EQUIPMENT, 4, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Silah
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kolye
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kupe
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kalkan
{INVENTORY, 0, 1, 50187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //Cirak sandigi
},
{
// SHAMAN
{EQUIPMENT, 0, 1, 11207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Bilezik
{EQUIPMENT, 4, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Silah
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kolye
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kupe
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Kalkan
{INVENTORY, 0, 1, 50187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //Cirak sandigi
}
};
unsigned job = pPacketDB->player.byJob;
extern bool RaceToJob(unsigned race, unsigned *ret_job);
RaceToJob(job, &job);
for (int i = 0; i < MAX_INITIAL_ITEM; i++)
{
if (initialItems[job][i].dwVnum == 0)
continue;
int job = pPacketDB->player.byJob;
for (int i=0; i < MAX_INITIAL_ITEM; i++)
{
if (initialItems[job][i].dwVnum == 0)
continue;
t.id = ITEM_MANAGER::instance().GetNewID();
t.window = initialItems[job][i].window;
t.pos = initialItems[job][i].pos;
t.count = initialItems[job][i].count;
t.vnum = initialItems[job][i].dwVnum;
t.alSockets[0] = initialItems[job][i].socket0;
t.alSockets[1] = initialItems[job][i].socket1;
t.alSockets[2] = initialItems[job][i].socket2;
t.aAttr[0] = initialItems[job][i].bType;
t.aAttr[0] = initialItems[job][i].sValue;
t.aAttr[1] = initialItems[job][i].bType;
t.aAttr[1] = initialItems[job][i].sValue;
t.aAttr[2] = initialItems[job][i].bType;
t.aAttr[2] = initialItems[job][i].sValue;
t.aAttr[3] = initialItems[job][i].bType;
t.aAttr[3] = initialItems[job][i].sValue;
t.aAttr[4] = initialItems[job][i].bType;
t.aAttr[4] = initialItems[job][i].sValue;
db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_SAVE, 0, sizeof(TPlayerItem));
db_clientdesc->Packet(&t, sizeof(TPlayerItem));
}
//baslangic item verme bitis
Linkleri görebilmek için
giriş yap veya kayıt ol.