Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into zmq
Browse files Browse the repository at this point in the history
Conflicts:
	Makefile.am
	configure.ac
	src/common/cbasetypes.h
	src/login/lobby.cpp
	src/login/login.cpp
	src/map/ai/ai_char_normal.cpp
	src/map/map.cpp
	src/map/map.h
	src/map/utils/charutils.cpp
  • Loading branch information
teschnei committed Oct 28, 2014
2 parents 66f70fe + 5e72d21 commit 50a3e61
Show file tree
Hide file tree
Showing 173 changed files with 19,196 additions and 16,383 deletions.
8 changes: 4 additions & 4 deletions Makefile.am
Expand Up @@ -13,11 +13,11 @@ LIBS_ALL = $(DARKSTAR_LIBS)
LDFLAGS_ALL = $(DARKSTAR_LDFLAGS)
CXX = g++ -std=gnu++0x

CFLAGS_ALL += $(CFLAGS_LUA)
CFLAGS_ALL +=$(CFLAGS_MYSQL)
CFLAGS_ALL += $(LUA_CFLAGS)
CFLAGS_ALL += $(MYSQL_CFLAGS)

LIBS_ALL += $(LIBS_LUA) -lluajit-5.1
LIBS_ALL += $(LIBS_MYSQL) -lmysqlclient
LIBS_ALL += $(LUA_LIBS)
LIBS_ALL += $(MYSQL_LDFLAGS)
LIBS_ALL += -lzmq

## Add Architecture-specific stuff
Expand Down
32 changes: 24 additions & 8 deletions conf/map_darkstar.conf
Expand Up @@ -80,7 +80,7 @@ all_jobs_widescan: 1
speed_mod: 0

#Modifier to apply to agro'd monster speed. 0 means default speed of 40, where 20 would mean speed 60 or -10 would mean speed 30.
MOB_speed_mod: 0
mob_speed_mod: 0

#Allows you to manipulate the constant multiplier in the skill-up rate formulas, having a potent effect on skill-up rates.
skillup_chance_multiplier: 2.5
Expand All @@ -96,20 +96,36 @@ craft_moonphase_matters: 0
craft_direction_matters: 0

#Adjust rate of TP gain for mobs and players. Acts as a multiplier, so default is 1.
mob_tp_multiplier: 1.0
player_tp_multiplier: 1.0
mob_tp_multiplier: 1.0
player_tp_multiplier: 1.0

#Adjust max HP pool for mobs and players. Acts as a multiplier, so default is 1.
mob_hp_multiplier: 1.0
#Adjust max HP pool for NMs, regular mobs, players. Acts as a multiplier, so default is 1.
nm_hp_multiplier: 1.0
mob_hp_multiplier: 1.0
player_hp_multiplier: 1.0

#Adjust max MP pool for mobs and players. Acts as a multiplier, so default is 1.
mob_mp_multiplier: 1.0
#Adjust max MP pool for NMs, regular mobs, and players. Acts as a multiplier, so default is 1.
nm_mp_multiplier: 1.0
mob_mp_multiplier: 1.0
player_mp_multiplier: 1.0

#Sets the fraction of MP a subjob provides to the main job. Retail is half and this acts as a divisor so default is 2
sj_mp_divisor: 2.0

#Adjust base stats (str/vit/etc.) for NMs, regular mobs, and players. Acts as a multiplier, so default is 1.
nm_stat_multiplier: 1.0
mob_stat_multiplier: 1.0
player_stat_multiplier: 1.0

#Adjust mob drop rate. Acts as a multiplier, so default is 1.
drop_rate_multiplier: 1.0

#All mobs drop this much extra gil per mob LV even if they normally drop zero.
all_mobs_gil_bonus: 0

#Maximum total bonus gil that can be dropped. Default 9999 gil.
max_gil_bonus: 9999

#Allows parry, block, and guard to skill up regardless of the action occuring.
# Bin Dec Note
# 0000 0 Classic
Expand Down Expand Up @@ -141,4 +157,4 @@ audit_party: 0

#Central message server settings (ensure these are the same on both all map servers and the central (lobby) server
msg_server_port: 54003
msg_server_ip: 127.0.0.1
msg_server_ip: 127.0.0.1
46 changes: 22 additions & 24 deletions configure.ac
@@ -1,10 +1,9 @@
### Package information
AC_PREREQ(2.61)
AC_INIT(DarkStarProject, m4_esyscmd([svnversion -n]))
AC_INIT(DarkStarProject,m4_esyscmd_s([git rev-parse HEAD]))
AC_CONFIG_SRCDIR([src/common/cbasetypes.h])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(DarkStar,9xx-svn)
AC_DEFINE(PACKAGE_LINE,"Alpha",Name of current line)
AM_INIT_AUTOMAKE(DarkStar,git)

### Checks for compiler and core header files
AC_PROG_CC
Expand All @@ -13,26 +12,25 @@ AC_PROG_CXXCPP
AC_LANG([C++])
AC_HEADER_STDC

###Add flags without overriding user-defined flags
### Add flags without overriding user-defined flags
DARKSTAR_CXXFLAGS="$CXXFLAGS -pipe -ffast-math -Wno-sign-compare"
DARKSTAR_CPPFLAGS="$CPPFLAGS -I../common"

### Big endian test
AC_C_BIGENDIAN(
[AC_MSG_ERROR([[bigendian is not supported... stopping]])],
,
[AC_MSG_WARN([[unable to determine endianess, only little endian is supported]])]
[AC_MSG_ERROR([[bigendian is not supported... stopping]])],
,
[AC_MSG_WARN([[unable to determine endianess, only little endian is supported]])]
)



### pkg-config checks
PKG_CHECK_MODULES(LUA, luajit)
PKG_CHECK_MODULES(LUA, luajit, , [PKG_CHECK_MODULES(LUA, lua5.1 >= 0.25)])
PKG_CHECK_MODULES(ZMQ, libzmq)
AC_SUBST(LUA_CFLAGS)
AC_SUBST(LUA_LIBS)

### MySQL check
m4_include([m4/ax_lib_mysql.m4])
AX_LIB_MYSQL()

### Checks for typedefs, structures, and compiler characteristics.
Expand Down Expand Up @@ -91,13 +89,13 @@ AC_ARG_ENABLE(
]
),
[
enable_debug="$enableval"
case $enableval in
"no");;
"yes");;
"gdb");;
*) AC_MSG_ERROR([[invalid argument --enable-debug=$enableval... stopping]]);;
esac
enable_debug="$enableval"
case $enableval in
"no");;
"yes");;
"gdb");;
*) AC_MSG_ERROR([[invalid argument --enable-debug=$enableval... stopping]]);;
esac
],
[enable_debug="no"]
)
Expand All @@ -106,7 +104,7 @@ AC_ARG_ENABLE(
AC_ARG_ENABLE(
[rdtsc],
AC_HELP_STRING(
[ --enable-rdtsc ],
[--enable-rdtsc],
[
Uses rdtsc as timing source (disabled by default)
Enable it when you have timing issues.
Expand All @@ -120,9 +118,9 @@ AC_ARG_ENABLE(
]
),
[
enable_rdtsc=1
enable_rdtsc=1
],
[ enable_rdtsc=0 ]
[enable_rdtsc=0]
)

AC_MSG_CHECKING([whether $CXX supports -Wno-unused-parameter])
Expand All @@ -132,8 +130,8 @@ AC_COMPILE_IFELSE(
[int foo;],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
DARKSTAR_CXXFLAGS="$OLD_DARKSTAR_CXXFLAGS"
AC_MSG_RESULT([no])
DARKSTAR_CXXFLAGS="$OLD_DARKSTAR_CXXFLAGS"
]
)

Expand All @@ -156,8 +154,8 @@ AC_COMPILE_IFELSE(
[int foo;],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
DARKSTAR_CXXFLAGS="$OLD_DARKSTAR_CXXFLAGS"
AC_MSG_RESULT([no])
DARKSTAR_CXXFLAGS="$OLD_DARKSTAR_CXXFLAGS"
]
)

Expand Down
147 changes: 147 additions & 0 deletions m4/ax_lib_mysql.m4
@@ -0,0 +1,147 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_lib_mysql.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_LIB_MYSQL([MINIMUM-VERSION])
#
# DESCRIPTION
#
# This macro provides tests of availability of MySQL client library of
# particular version or newer.
#
# AX_LIB_MYSQL macro takes only one argument which is optional. If there
# is no required version passed, then macro does not run version test.
#
# The --with-mysql option takes one of three possible values:
#
# no - do not check for MySQL client library
#
# yes - do check for MySQL library in standard locations (mysql_config
# should be in the PATH)
#
# path - complete path to mysql_config utility, use this option if
# mysql_config can't be found in the PATH
#
# This macro calls:
#
# AC_SUBST(MYSQL_CFLAGS)
# AC_SUBST(MYSQL_LDFLAGS)
# AC_SUBST(MYSQL_VERSION)
#
# And sets:
#
# HAVE_MYSQL
#
# LICENSE
#
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 12

AC_DEFUN([AX_LIB_MYSQL],
[
AC_ARG_WITH([mysql],
AS_HELP_STRING([--with-mysql=@<:@ARG@:>@],
[use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config]
),
[
if test "$withval" = "no"; then
want_mysql="no"
elif test "$withval" = "yes"; then
want_mysql="yes"
else
want_mysql="yes"
MYSQL_CONFIG="$withval"
fi
],
[want_mysql="yes"]
)
AC_ARG_VAR([MYSQL_CONFIG], [Full path to mysql_config program])
MYSQL_CFLAGS=""
MYSQL_LDFLAGS=""
MYSQL_VERSION=""
dnl
dnl Check MySQL libraries
dnl
if test "$want_mysql" = "yes"; then
if test -z "$MYSQL_CONFIG" ; then
AC_PATH_PROGS([MYSQL_CONFIG], [mysql_config mysql_config5], [no])
fi
if test "$MYSQL_CONFIG" != "no"; then
MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
MYSQL_VERSION=`$MYSQL_CONFIG --version`
found_mysql="yes"
else
found_mysql="no"
fi
fi
dnl
dnl Check if required version of MySQL is available
dnl
mysql_version_req=ifelse([$1], [], [], [$1])
if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
AC_MSG_CHECKING([if MySQL version is >= $mysql_version_req])
dnl Decompose required version string of MySQL
dnl and calculate its number representation
mysql_version_req_major=`expr $mysql_version_req : '\([[0-9]]*\)'`
mysql_version_req_minor=`expr $mysql_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
mysql_version_req_micro=`expr $mysql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$mysql_version_req_micro" = "x"; then
mysql_version_req_micro="0"
fi
mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
\+ $mysql_version_req_minor \* 1000 \
\+ $mysql_version_req_micro`
dnl Decompose version string of installed MySQL
dnl and calculate its number representation
mysql_version_major=`expr $MYSQL_VERSION : '\([[0-9]]*\)'`
mysql_version_minor=`expr $MYSQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
mysql_version_micro=`expr $MYSQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$mysql_version_micro" = "x"; then
mysql_version_micro="0"
fi
mysql_version_number=`expr $mysql_version_major \* 1000000 \
\+ $mysql_version_minor \* 1000 \
\+ $mysql_version_micro`
mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
if test "$mysql_version_check" = "1"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
if test "$found_mysql" = "yes" ; then
AC_DEFINE([HAVE_MYSQL], [1],
[Define to 1 if MySQL libraries are available])
fi
AC_SUBST([MYSQL_VERSION])
AC_SUBST([MYSQL_CFLAGS])
AC_SUBST([MYSQL_LDFLAGS])
])
5 changes: 1 addition & 4 deletions scripts/commands/giveexperience.lua
Expand Up @@ -11,9 +11,6 @@ cmdprops =
};

function onTrigger(player, target, amount)

print( 'Exp amount: ' .. tostring( amount ) );

if (target == nil or amount == nil) then
player:PrintToPlayer("You must enter a valid player name and amount.");
return;
Expand All @@ -25,4 +22,4 @@ print( 'Exp amount: ' .. tostring( amount ) );
else
player:PrintToPlayer( string.format( "Player named '%s' not found!", target ) );
end
end
end
5 changes: 4 additions & 1 deletion scripts/globals/abilities/third_eye.lua
Expand Up @@ -9,7 +9,10 @@ require("scripts/globals/status");
-- OnUseAbility
-----------------------------------

function OnAbilityCheck(player,target,ability)
function OnAbilityCheck(player,target,ability)
if (player:hasStatusEffect(EFFECT_SEIGAN)) then
ability:setRecast(ability:getRecast()/2);
end
return 0,0;
end;

Expand Down

0 comments on commit 50a3e61

Please sign in to comment.