Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-28-2006, 04:46 AM
aza77
Hill Giant
 
Join Date: Dec 2004
Posts: 126
Default MySQL 5.0 and eqemu

hi,
here's a short explanation how to get eqemu 6.4 DR1-613 running with mysql 5.0 (5.1 might work too but i didn't test it)

1) change the sourcecode
(the first one is the original source the second one the modified one)

diff -r 6.4/common/database.cpp 6.4a/common/database.cpp
2881c2881
< return MakeAnyLenString(query, "SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= %d", varcache_lastupdate);
---
> return MakeAnyLenString(query, "SELECT variables.varname, variables.value, unix_timestamp() FROM eqemu.variables where unix_timestamp(ts) >= %d", varcache_lastupdate);

2996c2996
< if (RunQuery(query, MakeAnyLenString(&query, "Update variables set value='%s' WHERE varname like '%s'", varvalue, varname), errbuf, 0, &affected_rows)) {
---
> if (RunQuery(query, MakeAnyLenString(&query, "Update eqemu.variables set variables.value='%s' WHERE variables.varname like '%s'", varvalue, varname), errbuf, 0, &affected_rows)) {

3005c3005
< if (RunQuery(query, MakeAnyLenString(&query, "Insert Into variables (varname, value) values ('%s', '%s')", varname, varvalue), errbuf, 0, &affected_rows)) {
---
> if (RunQuery(query, MakeAnyLenString(&query, "Insert Into eqemu.variables (varname, value) values ('%s', '%s')", varname, varvalue), errbuf, 0, &affected_rows)) {

4131c4131
< if (RunQuery(query, MakeAnyLenString(&query, "SELECT value FROM variables WHERE varname='ServerType'"), errbuf, &result)) {
---
> if (RunQuery(query, MakeAnyLenString(&query, "SELECT variables.value FROM eqemu.variables WHERE variables.varname='ServerType'"), errbuf, &result)) {

4167c4167
< if (RunQuery(query, MakeAnyLenString(&query, "SELECT value FROM variables WHERE varname='UseCFGSafeCoords'"), errbuf, &result)) {
---
> if (RunQuery(query, MakeAnyLenString(&query, "SELECT variables.value FROM eqemu.variables WHERE varname='UseCFGSafeCoords'"), errbuf, &result)) {
diff -r 6.4/zone/spawn2.cpp 6.4a/zone/spawn2.cpp

226c226
< MakeAnyLenString(&query, "SELECT id, spawngroupID, x, y, z, heading, respawntime, variance, pathgrid, timeleft, condition, cond_value FROM spawn2 WHERE zone='%s'", zone_name);
---
> MakeAnyLenString(&query, "SELECT id, spawngroupID, x, y, z, heading, respawntime, variance, pathgrid, timeleft, spawn2.condition, cond_value FROM spawn2 WHERE zone='%s'", zone_name);


diff -r 6.4/zone/spawngroup.cpp 6.4a/zone/spawngroup.cpp
161,163c161,163
< "SELECT spawnentry.spawngroupID, npcid, chance, "
< " spawnentry.spawn_limit AS gsl, npc_types.spawn_limit AS sl "
< "FROM spawnentry, spawn2 LEFT JOIN npc_types ON spawnentry.npcID = npc_types.id "
---
> "SELECT spawnentry.spawngroupID, spawnentry.npcID, spawnentry.chance, "
> "spawnentry.spawn_limit AS gsl, npc_types.spawn_limit AS sl "
> "FROM spawnentry INNER JOIN spawn2 LEFT JOIN npc_types ON spawnentry.npcID=npc_types.id "


diff -r 6.4/zone/zone.cpp 6.4a/zone/zone.cpp
1634c1634
< if (RunQuery(query, MakeAnyLenString(&query, "SELECT varname, value FROM variables WHERE varname like 'decaytime%%' ORDER BY varname"), errbuf, &result)) {
---
> if (RunQuery(query, MakeAnyLenString(&query, "SELECT variables.varname, variables.value FROM eqemu.variables WHERE varname like 'decaytime%%' ORDER BY varname"), errbuf, &result)) {



2) add the Spawn2 table

# MySQL-Front Dump 2.5
#
# Host: 192.168.0.9 Database: eq
# --------------------------------------------------------
# Server version 4.0.13-standard


#
# Table structure for table 'spawn2'
#

CREATE TABLE spawn2 (
id int(11) NOT NULL auto_increment,
spawngroupID int(11) NOT NULL default '0',
zone varchar(16) NOT NULL default '',
x float NOT NULL default '0',
y float NOT NULL default '0',
z float NOT NULL default '0',
heading float NOT NULL default '0',
respawntime int(11) NOT NULL default '0',
variance smallint(4) NOT NULL default '0',
pathgrid int(10) NOT NULL default '0',
timeleft bigint(16) NOT NULL default '0',
spawn2.condition MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',
cond_value MEDIUMINT NOT NULL DEFAULT '1',
PRIMARY KEY (id)
) TYPE=MyISAM;

3) add some data to spawn2

eg the PEQ database
https://www.projectf.de/spawn2data.sql
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:09 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3