Skip to content

Epoch 1.0.6 Changes#13

Open
icomrade wants to merge 21 commits into
vbawol:masterfrom
icomrade:master
Open

Epoch 1.0.6 Changes#13
icomrade wants to merge 21 commits into
vbawol:masterfrom
icomrade:master

Conversation

@icomrade

Copy link
Copy Markdown

Changes so far include duplicate UID fix and INT64 for CharID I haven't notice issues so far with the changes.

icomrade and others added 20 commits May 16, 2016 18:33
Allows for longer CharacterID field in all tables that use CharacterID.
This change was requested in the following issue
EpochModTeam/DayZ-Epoch#1371
ObjectID is written to ObjectUID on DB startup to prevent duplicate UID
since the ObjectID field is autoincremented by the SQL server
ObjectID of 1 is used by the game for some special objects
New Hive Child 204 for updating playerGroup column. Groups are returned
from the 101 Child on login.
Improve group saving, add GetInt64 for the longer characterID fields.
Server owners may continue to use their coins in object inventory but
are encouraged to save new object coins to the new StorageCoins column

New call to update player permanent coins, Child:205
_key = format["CHILD:205:%1:%2:%3:%4:",(getPlayerUID
_character),dayZ_instance,_globalCoins,_bankCoins];

_bankcoins represents the old BankSaldo field, I don't know what it was
for but I didn't want to to remove it.

use existing calls 303/309 for saving object_data coins. use 201 for
character coins

SQL:

ALTER TABLE `player_data` ADD `PlayerCoins` bigint(20) NOT NULL DEFAULT
"0";
ALTER TABLE `player_data` ADD `BankCoins` bigint(20) NOT NULL DEFAULT
"0";
ALTER TABLE `object_data` ADD `StorageCoins` bigint(20) NOT NULL DEFAULT
"0";
ALTER TABLE `character_data` ALTER COLUMN `CashMoney` `Coins` bigint(20)
NOT NULL DEFAULT "0";
UPDATE player_data t1, banking_data t2
SET t1.`PlayerCoins` = t2.bankMoney,
t1.`BankCoins` = t2.BankSaldo
WHERE t1.PlayerUID = t2.PlayerUID
Write file in C++ instead of returning a single object with each
itteration of callExtension in a loop. Also retained ability to use the
loop behavior.
Compensates for objects with data stored in the inventory field
Should make this easier to build going forward, since new versions of VS
work fine, and need to compile all dependencies anyway (as opposed to
using out-of date prebuilt ones)

Got Hive to build on VS 2017 community with this guide

Fix some git commands and python in version generator
removes need to wait and spawn code in SQF, meaning this method is much faster. initial procedure:
```
DROP procedure IF EXISTS `retObjID`;

DELIMITER $$
CREATE PROCEDURE `retObjID`(
    IN objTableName VARCHAR(256),
    IN SID INT(11),
    IN UID bigint(24),
    OUT OID INT(11)unsigned
)
BEGIN
 DECLARE x INT;
 declare sqlstr VARCHAR(256);

 SET @oid = 0;
 SET @x = 1;
 SET @sqlstr = CONCAT('SELECT `ObjectID` from `', objTableName ,'` where `Instance` = ', SID ,' AND `ObjectUID` = ', UID ,' INTO @oid');
 PREPARE stmt FROM @sqlstr;

 WHILE (@x <= 5) DO
  EXECUTE stmt;
  IF (@oid > 0) then
   SET @x = 6;
  else
   SET  @x = @x + 1;
   DO sleep(0.1);
  END IF;
 END WHILE;
 DEALLOCATE PREPARE stmt;
 SET OID = @oid;
 SELECT @oid;
END;$$

DELIMITER ;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant