Epoch 1.0.6 Changes#13
Open
icomrade wants to merge 21 commits into
Open
Conversation
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 ;
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes so far include duplicate UID fix and INT64 for CharID I haven't notice issues so far with the changes.