diff options
author | sat <sat@FreeBSD.org> | 2007-06-20 00:33:44 +0800 |
---|---|---|
committer | sat <sat@FreeBSD.org> | 2007-06-20 00:33:44 +0800 |
commit | c7c649569ffd362e5189869c738b8e222feefb19 (patch) | |
tree | eeffc0958954ccad03b0f38fc23beca21b722698 /games/mangos/files | |
parent | 064849a41d2d716f43e16d4f9f3870c6d2994afa (diff) | |
download | freebsd-ports-gnome-c7c649569ffd362e5189869c738b8e222feefb19.tar.gz freebsd-ports-gnome-c7c649569ffd362e5189869c738b8e222feefb19.tar.zst freebsd-ports-gnome-c7c649569ffd362e5189869c738b8e222feefb19.zip |
- Update to 3865
- Rework the port
PR: ports/113471 (based on)
Submitted by: Artem V. Kropachev <neon_cyrex@mail.ru>
Diffstat (limited to 'games/mangos/files')
-rw-r--r-- | games/mangos/files/HonorRate.patch | 44 | ||||
-rw-r--r-- | games/mangos/files/ScriptDev2.patch | 35 | ||||
-rw-r--r-- | games/mangos/files/configure.ac.patch | 10 | ||||
-rw-r--r-- | games/mangos/files/patch-time | 53 |
4 files changed, 132 insertions, 10 deletions
diff --git a/games/mangos/files/HonorRate.patch b/games/mangos/files/HonorRate.patch new file mode 100644 index 000000000000..24b4b8b32dc4 --- /dev/null +++ b/games/mangos/files/HonorRate.patch @@ -0,0 +1,44 @@ +--- src/game/World.h ++++ src/game/World.h +@@ -120,6 +120,7 @@ + RATE_AUCTION_TIME, + RATE_AUCTION_DEPOSIT, + RATE_AUCTION_CUT, ++ RATE_HONOR, + RATE_MINING_AMOUNT, + RATE_MINING_NEXT, + MAX_RATES +--- src/mangosd/mangosd.conf.in ++++ src/mangosd/mangosd.conf.in +@@ -233,6 +233,9 @@ + Rate.Mining.Amount = 1 + Rate.Mining.Next = 1 + ++# ++Rate.Honor = 1 ++ + # Save respawn time for creatures at death, for gameobjects at use/open + # 0 (save creature/gameobject respawn time at grid unload) + # Default: 1 (save creature/gameobject respawn time without waiting grid unload) + +--- src/game/Player.cpp ++++ src/game/Player.cpp +@@ -4697,7 +4697,7 @@ + + UpdateHonorFields(); // to prevent CalcluateHonor() on a new day before old honor was UpdateHonorFields() + +- float honor = ((float)urand(1,80))/10; // honor between: 0.1 - 8.0 ++ float honor = ((float)urand(1,80))/10 * sWorld.getRate(RATE_HONOR); // honor between: 0.1 - 8.0 + float approx_honor = honor * (((float)urand(8,12))/10); // approx honor: 80% - 120% of real honor + sDatabase.Execute("INSERT INTO `character_kill` (`guid`,`creature_template`,`honor`,`date`) VALUES (%u, %u, %f, %u)", GUID_LOPART(GetGUID()), uVictim->GetEntry(), honor, time(0)); + +--- src/game/World.cpp ++++ src/game/World.cpp +@@ -257,6 +257,7 @@ + rate_values[RATE_AUCTION_TIME] = sConfig.GetFloatDefault("Rate.Auction.Time", 1); + rate_values[RATE_AUCTION_DEPOSIT] = sConfig.GetFloatDefault("Rate.Auction.Deposit", 1); + rate_values[RATE_AUCTION_CUT] = sConfig.GetFloatDefault("Rate.Auction.Cut", 1); ++ rate_values[RATE_HONOR] = sConfig.GetFloatDefault("Rate.Honor", 1); + rate_values[RATE_MINING_AMOUNT] = sConfig.GetFloatDefault("Rate.Mining.Amount",1); + rate_values[RATE_MINING_NEXT] = sConfig.GetFloatDefault("Rate.Mining.Next",1); + diff --git a/games/mangos/files/ScriptDev2.patch b/games/mangos/files/ScriptDev2.patch new file mode 100644 index 000000000000..af1cb7b0a082 --- /dev/null +++ b/games/mangos/files/ScriptDev2.patch @@ -0,0 +1,35 @@ +--- src/mangosd/Makefile.am ++++ src/mangosd/Makefile.am +@@ -33,8 +33,8 @@ + WorldRunnable.h + + ## Link world daemon against the shared library +-mangos_worldd_LDADD = ../bindings/universal/libmangosscript.la ../game/libmangosgame.a ../shared/libmangosdatabase.a ../shared/libmangosconfig.a ../shared/libmangosauth.a ../shared/libmangosshared.a ../shared/libmangosnetwork.a ../framework/libmangosframework.a ../../dep/src/zthread/libZThread.la +-mangos_worldd_LDFLAGS = -L../../dep/src/zthread -L../bindings/universal/ $(MYSQL_LIBS) -L$(libdir) $(ZLIB) $(COMPATLIB) $(SSLLIB) -export-dynamic ++mangos_worldd_LDADD = ../bindings/ScriptDev2/libmangosscript.la ../game/libmangosgame.a ../shared/libmangosdatabase.a ../shared/libmangosconfig.a ../shared/libmangosauth.a ../shared/libmangosshared.a ../shared/libmangosnetwork.a ../framework/libmangosframework.a ../../dep/src/zthread/libZThread.la ++mangos_worldd_LDFLAGS = -L../../dep/src/zthread -L../bindings/ScriptDev2/ $(MYSQL_LIBS) -L$(libdir) $(ZLIB) $(COMPATLIB) $(SSLLIB) -export-dynamic + + ## Additional files to include when running 'make dist' + # Include world daemon configuration +--- configure.ac ++++ configure.ac +@@ -191,7 +191,10 @@ + src/mangosd/Makefile + src/mangosd/mangosd.conf + src/bindings/Makefile +- src/bindings/universal/Makefile ++ src/bindings/ScriptDev2/Makefile ++ src/bindings/ScriptDev2/sql/Makefile ++ src/bindings/ScriptDev2/sql/Updates/Makefile ++ + ]) + + ## Disabled Makefiles, until they are ready for a successful make and +--- src/bindings/Makefile.am ++++ src/bindings/Makefile.am +@@ -14,4 +14,4 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +-SUBDIRS = universal ++SUBDIRS = ScriptDev2 diff --git a/games/mangos/files/configure.ac.patch b/games/mangos/files/configure.ac.patch deleted file mode 100644 index c99aeb6552eb..000000000000 --- a/games/mangos/files/configure.ac.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- configure.ac.orig Mon Mar 19 11:08:32 2007 -+++ configure.ac Mon Mar 19 11:08:43 2007 -@@ -187,6 +187,7 @@ - src/mangosd/mangosd.conf - src/bindings/Makefile - src/bindings/universal/Makefile -+ src/bindings/ScriptDev2/Makefile - ]) - - ## Disabled Makefiles, until they are ready for a successful make and diff --git a/games/mangos/files/patch-time b/games/mangos/files/patch-time new file mode 100644 index 000000000000..8024cbfef93a --- /dev/null +++ b/games/mangos/files/patch-time @@ -0,0 +1,53 @@ +--- src/shared/EventSystem.cpp Wed May 23 10:14:13 2007 ++++ src/shared/EventSystem.cpp Wed May 23 10:16:34 2007 +@@ -21,7 +21,7 @@ + #include "EventSystem.h" + + #ifndef WIN32 +-#include <sys/timeb.h> ++#include <sys/time.h> + #endif + + PeriodicEvent *msPEvents=NULL; +@@ -103,10 +103,11 @@ + #if PLATFORM == PLATFORM_WIN32 + return timeGetTime(); + #else +- struct timeb tp; +- ftime(&tp); ++ ++ struct timeval tv; ++ gettimeofday(&tv, (struct timezone*) NULL); + +- return tp.time * 1000 + tp.millitm; ++ return tv.tv_sec * 1000 + tv.tv_usec / 1000; + #endif + } + +--- src/shared/Timer.h Sat Mar 17 14:26:42 2007 ++++ src/shared/Timer.h Wed May 23 10:43:28 2007 +@@ -27,7 +27,7 @@ + # include <time.h> + #else + # if defined(__FreeBSD__) || defined(__APPLE_CC__) +-# include <time.h> ++# include <sys/time.h> + # endif + # include <sys/timeb.h> + #endif +@@ -38,10 +38,11 @@ + #if PLATFORM == PLATFORM_WIN32 + time_in_ms = timeGetTime(); + #else +- struct timeb tp; +- ftime(&tp); +- +- time_in_ms = tp.time * 1000 + tp.millitm; ++ struct timeval tv; ++ gettimeofday(&tv, (struct timezone*) NULL); ++ ++ time_in_ms = tv.tv_sec * 1000 + tv.tv_usec / 1000; ++ + #endif + + return time_in_ms; |