sparc
Members-
Posts
4 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
sparc's Achievements
Newbie (1/3)
0
Reputation
-
Hi all No problem to get the source repository from git on windows but just a question: How to apply patches ( .patch files or .diff ) with git? May the .patch files work with git? Thx
-
and player_levelstats DELIMITER $$ DROP PROCEDURE IF EXISTS `sp_CharExtraLevelStats` $$ CREATE PROCEDURE `sp_CharExtraLevelStats` () BEGIN -- Declaration des constantes/maximum/limites DECLARE intMaxStats INT DEFAULT 255; DECLARE sngStatsInc FLOAT DEFAULT 0.05; -- Increment of 5% per level, adjust to whatever you like DECLARE intStartLvl INT DEFAULT 70; -- Starting level,70 is the default DECLARE intFinishLvl INT DEFAULT 80; -- Finishing level, 80 is the default -- Declaration des variabes de base DECLARE intRecordDone INT DEFAULT 0; DECLARE intRace INT DEFAULT 0; DECLARE intClass INT DEFAULT 0; DECLARE intLevel INT DEFAULT 0; DECLARE intCurrSTR INT DEFAULT 0; DECLARE intCurrAGI INT DEFAULT 0; DECLARE intCurrSTA INT DEFAULT 0; DECLARE intCurrINT INT DEFAULT 0; DECLARE intCurrSPI INT DEFAULT 0; -- Declaration des algorythme DECLARE curPlayerStat CURSOR FOR SELECT `race`, `class`, `level`, `str`, `agi`, `sta`, `inte`, `spi` FROM player_levelstats; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET intRecordDone = 1; OPEN curPlayerStat; REPEAT FETCH curPlayerStat INTO intRace, intClass, intLevel, intCurrSTR, intCurrAGI, intCurrSTA, intCurrINT, intCurrSPI; IF intLevel = intStartLvl THEN REPEAT -- Nous allons faire cela pour le lvl suivant SET intLevel = intLevel + 1; -- Delete the entry for the next level (this is so we don't have to check whether we need UPDATE or INSERT statement DELETE FROM player_levelstats WHERE `race` = intRace AND `class` = intClass AND `level` = intLevel; -- Calcule du suivant STR IF (ROUND(intCurrSTR * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrSTR = ROUND(intCurrSTR * (1 + sngStatsInc)); ELSE SET intCurrSTR = intMaxStats; END IF; -- Calcule du suivant AGI IF (ROUND(intCurrAGI * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrAGI = ROUND(intCurrAGI * (1 + sngStatsInc)); ELSE SET intCurrAGI = intMaxStats; END IF; -- Calcule du suivant STA IF (ROUND(intCurrSTA * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrSTA = ROUND(intCurrSTA * (1 + sngStatsInc)); ELSE SET intCurrSTA = intMaxStats; END IF; -- Calcule du suivant INT IF (ROUND(intCurrINT * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrINT = ROUND(intCurrINT * (1 + sngStatsInc)); ELSE SET intCurrINT = intMaxStats; END IF; -- Calcule du suivant SPI IF (ROUND(intCurrSPI * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrSPI = ROUND(intCurrSPI * (1 + sngStatsInc)); ELSE SET intCurrSPI = intMaxStats; END IF; -- insertion dans la table INSERT INTO player_levelstats (`race`, `class`, `level`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES (intRace, intClass, intLevel, intCurrSTR, intCurrAGI, intCurrSTA, intCurrINT, intCurrSPI); UNTIL intLevel = intFinishLvl END REPEAT; END IF; UNTIL intRecordDone END REPEAT; -- on ferme l'algorythme CLOSE curPlayerStat; END $$ DELIMITER ; call sp_CharExtraLevelStats();
-
player_classlevelstats DELIMITER $$ DROP PROCEDURE IF EXISTS `sp_CharExtraclassLevelStats` $$ CREATE PROCEDURE `sp_CharExtraclassLevelStats` () BEGIN -- Declaration des constantes/maximum/limites DECLARE intMaxHP INT DEFAULT 65535; DECLARE intMaxMana INT DEFAULT 65535; DECLARE sngHPInc FLOAT DEFAULT 0.05; -- Increment of 5% per level, adjust to whatever you like DECLARE sngManaInc FLOAT DEFAULT 0.05; -- Increment of 5% per level, adjust to whatever you like DECLARE intStartLvl INT DEFAULT 70; -- Starting level,70 is the default DECLARE intFinishLvl INT DEFAULT 80; -- Finishing level, 80 is the default -- Declaration des variables de base DECLARE intRecordDone INT DEFAULT 0; DECLARE intClass INT DEFAULT 0; DECLARE intLevel INT DEFAULT 0; DECLARE intCurrHP INT DEFAULT 0; DECLARE intCurrMana INT DEFAULT 0; -- Declaration de l'algorythme DECLARE curPlayerStat CURSOR FOR SELECT `class`, `level`, `basehp`, `basemana` FROM player_classlevelstats; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET intRecordDone = 1; OPEN curPlayerStat; REPEAT FETCH curPlayerStat INTO intClass, intLevel, intCurrHP, intCurrMana; IF intLevel = intStartLvl THEN REPEAT -- nous allons faire cela pour le lvl suivant SET intLevel = intLevel + 1; -- Delete the entry for the next level (this is so we don't have to check whether we need UPDATE or INSERT statement DELETE FROM player_classlevelstats WHERE `class` = intClass AND `level` = intLevel; -- Calcule du suivant H{ IF (ROUND(intCurrHP * (1 + sngHPInc))) <= intMaxHP THEN SET intCurrHP = ROUND(intCurrHP * (1 + sngHPInc)); ELSE SET intCurrHP = intMaxHP; -- Making sure we don't exceed the database limit END IF; -- Calcule des Mana suivant IF (ROUND(intCurrMana * (1 + sngManaInc))) <= intMaxMana THEN SET intCurrMana = ROUND(intCurrMana * (1 + sngManaInc)); ELSE SET intCurrMana = intMaxMana; END IF; -- Insertion dans la table INSERT INTO player_classlevelstats (`class`, `level`, `basehp`, `basemana`) VALUES (intClass, intLevel, intCurrHP, intCurrMana); UNTIL intLevel = intFinishLvl END REPEAT; END IF; UNTIL intRecordDone END REPEAT; -- on ferme l'algorythme CLOSE curPlayerStat; END $$ DELIMITER ; call sp_CharExtraclassLevelStats();
-
Hi Here are some procedures to calculate stats. pet_levelstats DELIMITER $$ DROP PROCEDURE IF EXISTS `sp_PetExtraLevelStats` $$ CREATE PROCEDURE `sp_PetExtraLevelStats` () BEGIN -- Declaration des constantes/maximum/limites DECLARE intMaxHP INT DEFAULT 65535; DECLARE intMaxMana INT DEFAULT 65535; DECLARE intMaxArmor INT DEFAULT 65535; DECLARE intMaxStats INT DEFAULT 600; DECLARE sngHPInc FLOAT DEFAULT 0.05; -- Increment of 5% per level, adjust to whatever you like DECLARE sngManaInc FLOAT DEFAULT 0.05; -- Increment of 5% per level, adjust to whatever you like DECLARE sngArmorInc FLOAT DEFAULT 0.05; -- Increment of 5% per level, adjust to whatever you like DECLARE sngStatsInc FLOAT DEFAULT 0.05; -- Increment of 5% per level, adjust to whatever you like DECLARE intStartLvl INT DEFAULT 70; -- Starting level,70 is the default DECLARE intFinishLvl INT DEFAULT 80; -- Finishing level, 80 is the default -- Declaration des variables de base DECLARE intRecordDone INT DEFAULT 0; DECLARE intCreature INT DEFAULT 0; DECLARE intLevel INT DEFAULT 0; DECLARE intClass INT DEFAULT 0; DECLARE intCurrHP INT DEFAULT 0; DECLARE intCurrMana INT DEFAULT 0; DECLARE intCurrArmor INT DEFAULT 0; DECLARE intCurrSTR INT DEFAULT 0; DECLARE intCurrAGI INT DEFAULT 0; DECLARE intCurrSTA INT DEFAULT 0; DECLARE intCurrINT INT DEFAULT 0; DECLARE intCurrSPI INT DEFAULT 0; -- Declaration de l'algorythme DECLARE curPetStat CURSOR FOR SELECT `creature_entry`, `level`, `hp`, `mana`, `armor`, `str`, `agi`, `sta`, `inte`, `spi` FROM pet_levelstats; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET intRecordDone = 1; OPEN curPetStat; REPEAT FETCH curPetStat INTO intCreature, intLevel, intCurrHP, intCurrMana, intCurrArmor, intCurrSTR, intCurrAGI, intCurrSTA, intCurrINT, intCurrSPI; IF intLevel = intStartLvl THEN REPEAT -- ce que nous allons faire pour le lvl suivant SET intLevel = intLevel + 1; -- Delete the entry for the next level (this is so we don't have to check whether we need UPDATE or INSERT statement DELETE FROM pet_levelstats WHERE `creature_entry` = intCreature AND `level` = intLevel; -- Calcule du suivant H{ IF (ROUND(intCurrHP * (1 + sngHPInc))) <= intMaxHP THEN SET intCurrHP = ROUND(intCurrHP * (1 + sngHPInc)); ELSE SET intCurrHP = intMaxHP; -- Making sure we don't exceed the database limit END IF; -- Calcule des Mana suivant IF (ROUND(intCurrMana * (1 + sngManaInc))) <= intMaxMana THEN SET intCurrMana = ROUND(intCurrMana * (1 + sngManaInc)); ELSE SET intCurrMana = intMaxMana; END IF; -- Calcule de l'armure suivant IF (ROUND(intCurrArmor * (1 + sngArmorInc))) <= intMaxArmor THEN SET intCurrArmor = ROUND(intCurrArmor * (1 + sngArmorInc)); ELSE SET intCurrArmor = intMaxArmor; END IF; -- Calcule du suivant STR IF (ROUND(intCurrSTR * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrSTR = ROUND(intCurrSTR * (1 + sngStatsInc)); ELSE SET intCurrSTR = intMaxStats; END IF; -- Calcule du suivant AGI IF (ROUND(intCurrAGI * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrAGI = ROUND(intCurrAGI * (1 + sngStatsInc)); ELSE SET intCurrAGI = intMaxStats; END IF; -- Calcule du suivant STA IF (ROUND(intCurrSTA * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrSTA = ROUND(intCurrSTA * (1 + sngStatsInc)); ELSE SET intCurrSTA = intMaxStats; END IF; -- Calcule du suivant INT IF (ROUND(intCurrINT * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrINT = ROUND(intCurrINT * (1 + sngStatsInc)); ELSE SET intCurrINT = intMaxStats; END IF; -- Calcule du suivant SPI IF (ROUND(intCurrSPI * (1 + sngStatsInc))) <= intMaxStats THEN SET intCurrSPI = ROUND(intCurrSPI * (1 + sngStatsInc)); ELSE SET intCurrSPI = intMaxStats; END IF; -- Insertion dans la table INSERT INTO pet_levelstats (`creature_entry`, `level`, `hp`, `mana`, `armor`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES (intCreature, intLevel, intCurrHP, intCurrMana, intCurrArmor, intCurrSTR, intCurrAGI, intCurrSTA, intCurrINT, intCurrSPI); UNTIL intLevel = intFinishLvl END REPEAT; END IF; UNTIL intRecordDone END REPEAT; -- on ferme l'algorythme CLOSE curPetStat; END $$ DELIMITER ; call sp_PetExtraLevelStats();
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®