mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
commit
ea6e239d58
19
zone/npc.cpp
19
zone/npc.cpp
@ -2432,12 +2432,20 @@ int NPC::GetScore()
|
||||
|
||||
if(lv < 46)
|
||||
{
|
||||
minx = ceil( ((lv - (lv / 10)) - 1) );
|
||||
#if _MSC_VER==1600
|
||||
minx = ceil((float) ((lv - (lv / 10)) - 1) );
|
||||
#else
|
||||
minx = ceil( ((lv - (lv / 10)) - 1) );
|
||||
#endif
|
||||
basehp = (lv * 10) + (lv * lv);
|
||||
}
|
||||
else
|
||||
{
|
||||
minx = ceil( ((lv - (lv / 10)) - 1) - (( abs(45 - lv) ) / 2) );
|
||||
#if _MSC_VER==1600
|
||||
minx = ceil((float) ((lv - (lv / 10)) - 1) - (( abs(45 - lv) ) / 2) );
|
||||
#else
|
||||
minx = ceil( ((lv - (lv / 10)) - 1) - (( abs(45 - lv) ) / 2) );
|
||||
#endif
|
||||
basehp = (lv * 10) + ((lv * lv) * 4);
|
||||
}
|
||||
|
||||
@ -2463,10 +2471,17 @@ int NPC::GetScore()
|
||||
}
|
||||
|
||||
if(npc_spells_id > 12)
|
||||
#if _MSC_VER==1600
|
||||
{
|
||||
if(lv < 16) { spccontrib++; }
|
||||
else { spccontrib += (int)floor((float) lv/15); }
|
||||
}
|
||||
#else
|
||||
{
|
||||
if(lv < 16) { spccontrib++; }
|
||||
else { spccontrib += (int)floor(lv/15); }
|
||||
}
|
||||
#endif
|
||||
|
||||
final = minx + hpcontrib + dmgcontrib + spccontrib;
|
||||
final = max(1, final);
|
||||
|
||||
@ -2676,7 +2676,9 @@ void Zone::LoadTickItems()
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
#if _MSC_VER==1600
|
||||
item_tick_struct ti_tmp;
|
||||
#endif
|
||||
tick_items.clear();
|
||||
//tick_globals.clear();
|
||||
|
||||
@ -2689,9 +2691,20 @@ void Zone::LoadTickItems()
|
||||
//tick_globals[std::string(row[0])] = { 0, atoi(row[1]), atoi(row[2]), (int16)atoi(row[4]), std::string(row[3]) };
|
||||
}
|
||||
else
|
||||
{
|
||||
#if _MSC_VER==1600
|
||||
{
|
||||
ti_tmp.itemid = atoi(row[0]);
|
||||
ti_tmp.chance = atoi(row[1]);
|
||||
ti_tmp.level = atoi(row[2]);
|
||||
ti_tmp.bagslot = (int16)atoi(row[4]);
|
||||
ti_tmp.qglobal = std::string(row[3]);
|
||||
tick_items[atoi(row[0])] = ti_tmp;
|
||||
}
|
||||
#else
|
||||
{
|
||||
tick_items[atoi(row[0])] = { atoi(row[0]), atoi(row[1]), atoi(row[2]), (int16)atoi(row[4]), std::string(row[3]) };
|
||||
}
|
||||
#endif
|
||||
}
|
||||
mysql_free_result(result);
|
||||
safe_delete_array(query);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user