--- deliantra/server/common/exp.C 2006/09/10 16:00:23 1.5
+++ deliantra/server/common/exp.C 2007/11/08 19:43:23 1.17
@@ -1,32 +1,26 @@
-
/*
- * static char *rcsid_arch_c =
- * "$Id: exp.C,v 1.5 2006/09/10 16:00:23 root Exp $";
+ * This file is part of Deliantra, the Roguelike Realtime MMORPG.
+ *
+ * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
+ * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
+ * Copyright (©) 1992,2007 Frank Tore Johansen
+ *
+ * Deliantra is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * The authors can be reached via e-mail to
*/
-/*
- CrossFire, A Multiplayer game for X-windows
-
- Copyright (C) 2002 Mark Wedel & Crossfire Development Team
- Copyright (C) 1992 Frank Tore Johansen
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- The authors can be reached via e-mail at crossfire-devel@real-time.com
-*/
-
#include
#include
@@ -86,7 +80,6 @@
* this is only used with one of the dumpflags,
* and not anyplace in the code.
*/
-
int
new_exp (const object *ob)
{
@@ -120,7 +113,7 @@
exp *= (QUERY_FLAG (ob, FLAG_CAST_SPELL) && has_ability (ob)) ? (40 + (ob->stats.maxsp > 80 ? 80 : ob->stats.maxsp)) / 40 : 1;
exp *= (80.0 / (70.0 + ob->stats.wc)) * (80.0 / (70.0 + ob->stats.ac)) * (50.0 + ob->stats.dam) / 50.0;
exp *= att_mult * prot_mult * spec_mult;
- exp *= 2.0 / (2.0 - ((FABS (ob->speed) < 0.95) ? FABS (ob->speed) : 0.95));
+ exp *= 2.0 / (2.0 - ((fabs (ob->speed) < 0.95) ? fabs (ob->speed) : 0.95));
exp *= (20.0 + ob->stats.Con) / 20.0;
if (QUERY_FLAG (ob, FLAG_STAND_STILL))
exp /= 2;
@@ -210,11 +203,7 @@
*/
if (tmpexp <= lastexp)
{
-#ifndef WIN32
- LOG (llevError, "Experience for level %d is lower than previous level (%lld <= %lld)\n", lastlevel + 1, tmpexp, lastexp);
-#else
- LOG (llevError, "Experience for level %d is lower than previous level (%I64d <= %I64d)\n", lastlevel + 1, tmpexp, lastexp);
-#endif
+ LOG (llevError, "Experience for level %d is lower than previous level (%" PRId64 " <= %" PRId64 ")\n", lastlevel + 1, tmpexp, lastexp);
exit (1);
}
lastlevel++;