1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 11:47:48 +00:00

fixed import script, improved db import times, fixed logging and warp command (should be 5000% legit now)

- improved import times for gamedata tables (there's prolly other innodb tables too, i didnt check though)
- fixed issue where player wouldnt be readded to zone on warping if destination wasnt valid
- corrected typo in warp command lua description
- added logger for lua cause i forgot to last time
This commit is contained in:
Tahir Akhlaq 2016-07-27 17:23:52 +01:00
parent 7f65cfcbbf
commit 065fe05795
14 changed files with 60 additions and 12 deletions

View file

@ -88,7 +88,7 @@ namespace FFXIVClassic_Map_Server
if (cmd.Any())
{
// if client isnt null, take player to be the player actor
var player = client.GetActor();
var player = client?.GetActor();
if (cmd.Equals("help"))
{

View file

@ -53,6 +53,7 @@
<!-- add your logging rules here -->
<logger name='*' minlevel='Trace' writeTo='file' />
<logger name='FFXIVClassic_Map_Server.Program' minlevel='Trace' writeTo='console' />
<logger name='FFXIVClassic_Map_Server.lua.*' minlevel='Trace' writeTo='console' />
<logger name='FFXIVClassic_Map_Server.packets.*' minlevel='Debug' writeTo='packets' />
<!--
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"

View file

@ -360,12 +360,10 @@ namespace FFXIVClassic_Map_Server
//Moves actor to new zone, and sends packets to spawn at the given coords.
public void DoZoneChange(Player player, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
{
Area oldZone;
Area oldZone = player.zone;
//Remove player from currentZone if transfer else it's login
if (player.zone != null)
{
oldZone = player.zone;
oldZone.RemoveActorFromZone(player);
}
@ -376,9 +374,20 @@ namespace FFXIVClassic_Map_Server
newArea = GetZone(destinationZoneId);
else
newArea = GetZone(destinationZoneId).GetPrivateArea(destinationPrivateArea, 0);
//This server does not contain that zoneId
if (newArea == null)
{
if (oldZone != null)
{
oldZone.AddActorToZone(player);
}
var message = "WorldManager.DoZoneChange: unable to change areas, new area is not valid.";
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM, "[Debug]", message);
Program.Log.Debug(message);
return;
}
newArea.AddActorToZone(player);

View file

@ -7,7 +7,7 @@ properties = {
[[
<zone> |
<zone> <x> <y> <z> |
<x> <y> <z> <zone> <privateArea> <target name>.
<zone> <x> <y> <z> <privateArea> <target name>.
]],
}

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_achievements`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_achievements`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -795,4 +797,6 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
COMMIT;
-- Dump completed on 2016-06-07 22:54:49

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_actor_appearance`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_actor_appearance`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -7916,4 +7918,6 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
COMMIT;
-- Dump completed on 2016-06-07 22:54:50

View file

@ -8,6 +8,8 @@ Date: 6/21/2016 10:49:37 PM
*/
SET FOREIGN_KEY_CHECKS=0;
SET autocommit = 0;
-- ----------------------------
-- Table structure for gamedata_actor_class
-- ----------------------------
@ -8006,3 +8008,5 @@ INSERT INTO `gamedata_actor_class` VALUES ('9220405', '', '2', null);
INSERT INTO `gamedata_actor_class` VALUES ('9220406', '', '2', null);
INSERT INTO `gamedata_actor_class` VALUES ('9220407', '', '2', null);
INSERT INTO `gamedata_actor_class` VALUES ('9220408', '', '2', null);
COMMIT;

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_items`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_items`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -8476,4 +8478,6 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
COMMIT;
-- Dump completed on 2016-06-07 22:54:51

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_items_accessory`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_items_accessory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -326,4 +328,6 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
COMMIT;
-- Dump completed on 2016-06-07 22:54:51

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_items_armor`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_items_armor`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_items_equipment`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_items_equipment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -4946,4 +4948,6 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
COMMIT;
-- Dump completed on 2016-06-07 22:54:52

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_items_graphics`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_items_graphics`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -144,4 +146,6 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
COMMIT;
-- Dump completed on 2016-06-07 22:54:52

View file

@ -19,6 +19,8 @@
-- Table structure for table `gamedata_items_weapon`
--
SET autocommit = 0;
DROP TABLE IF EXISTS `gamedata_items_weapon`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -1230,4 +1232,6 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
COMMIT;
-- Dump completed on 2016-06-07 22:54:52

View file

@ -1,5 +1,5 @@
#!/bin/bash
IMPORT_PATH=C:/repositories/ffxiv-classic-server/sql/
IMPORT_PATH="C://coding//repositories//ffxiv related//ffxivclassic//ffxiv-classic-server//sql//"
USER=root
PASS=root
DBNAME=ffxiv_server
@ -8,14 +8,18 @@ ECHO Creating Database $DBNAME
mysqladmin -h localhost -u $USER -p$PASS DROP $DBNAME
ECHO Creating Database $DBNAME
mysqladmin -h localhost -u $USER -p$PASS CREATE $DBNAME
mysqladmin -h localhost -u $USER -p$PASS CREATE $DBNAME IF NOT EXISTS $DBNAME
ECHO Loading $DBNAME tables into the database
cd $IMPORT_PATH
for X in *.sql;
sh cd $IMPORT_PATH
for X in '*.sql';
do
echo Importing $X;
"C:\program files\mysql\mysql server 5.7\bin\mysql" $DBNAME -h localhost -u $USER -p$PASS < $X
for Y in $X
do
echo Importing $Y;
"C:\program files\mysql\mysql server 5.7\bin\mysql" $DBNAME -h localhost -u $USER -p$PASS < $Y
done
done
ECHO Finished!