increaseexperience
public void increaseexperience(serversockets.packet stream, double experience, enums.experienceeffect effect = enums.experienceeffect.none) { if (entity.cursedtimer > 2) { return; } if (entity.level < 140) { experience *= constants.extraexperiencerate; experience += experience * entity.gems[3] / 100; if (entity.doubleexperiencetime > 0) experience *= 2; if (entity.mapid == 1039) experience /= 100; entity.experience += (ulong)experience; byte level = entity.level; while (entity.experience >= database.dataholder.levelexperience(entity.level) && entity.level < 140) { entity.experience -= database.dataholder.levelexperience(entity.level); level++; if (level >= 140) { entity.experience = 0; } } updatelevel(stream, level); entity.level = level; updaterebornlastlevel(stream); entity.sendupdate(stream, (long)entity.experience, game.msgserver.msgupdate.datatype.experience, false); } }
static ulong[] levelexperience = new ulong public static ulong levelexperience(byte level)