From 7bafd77c6f44731a71d55deb149fc5ac2c50deab Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Sat, 4 Jul 2015 18:27:52 -0700 Subject: [PATCH 1/8] Fix #4 --- Scripts/Commands/GenTeleporter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Commands/GenTeleporter.cs b/Scripts/Commands/GenTeleporter.cs index 3d66f8118..94e4abf31 100644 --- a/Scripts/Commands/GenTeleporter.cs +++ b/Scripts/Commands/GenTeleporter.cs @@ -193,8 +193,8 @@ namespace Server.Commands DestroyTeleporter( 5595, 1840, -14, map ); DestroyTeleporter( 5595, 1840, -14, map ); - CreateTeleporter( 5594, 1840, -9, 5467, 1804, 7, map, false ); - CreateTeleporter( 5594, 1841, -9, 5467, 1805, 7, map, false ); + CreateTeleporter( 5594, 1840, -8, 5467, 1804, 7, map, false ); + CreateTeleporter( 5594, 1841, -8, 5467, 1805, 7, map, false ); // Wrong CreateTeleporter( 5824, 631, 5, 2041, 215, 14, map, true ); From 1920989a75677241fa93c8b8470c96bbb97d067b Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Sat, 4 Jul 2015 18:29:10 -0700 Subject: [PATCH 2/8] Mindblast modifier to /2 (Fix #5) --- Scripts/Spells/Fifth/MindBlast.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Spells/Fifth/MindBlast.cs b/Scripts/Spells/Fifth/MindBlast.cs index 5a2a19ea5..3243408b6 100644 --- a/Scripts/Spells/Fifth/MindBlast.cs +++ b/Scripts/Spells/Fifth/MindBlast.cs @@ -104,7 +104,7 @@ namespace Server.Spells.Fifth if ( lowestStat > 150 ) lowestStat = 150; - double damage = GetDamageScalar(m)*(highestStat - lowestStat) / 4;//less damage + double damage = GetDamageScalar(m)*(highestStat - lowestStat) / 2; // Many users prefer 3 or 4 if ( damage > 45 ) damage = 45; @@ -152,4 +152,4 @@ namespace Server.Spells.Fifth } } } -} \ No newline at end of file +} From 851974d2220c041a53d776afc63715d2a31199bb Mon Sep 17 00:00:00 2001 From: The Gitter Badger Date: Tue, 7 Jul 2015 06:38:02 +0000 Subject: [PATCH 3/8] Added Gitter badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e4a5ff7fe..e9d8e7cb7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ runuo ===== +[![Join the chat at https://gitter.im/runuo/runuo](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/runuo/runuo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + RunUO Git Repository Typical Windows Build From 1e5bc723669138e097e45c0a68e18699959273ec Mon Sep 17 00:00:00 2001 From: Vorspire Date: Tue, 21 Jul 2015 00:45:43 +0100 Subject: [PATCH 4/8] Infinite Loop Breakout There is a very rare potential, mostly in custom situations, for the 'BaseRunicTool' 'ApplySkillBonus' method to cause the server to become unresponsive. The reason for this is that, if you call the method on a 'Spellbook' which already has all 4 of the skills listed by default in 'm_PossibleSpellbookSkills', then 'found' is always true. This issue has been reproduced on a shard that calls 'ApplySkillBonus' more than once when crafting 'Spellbooks'; the rarity is that the 'ApplyAttributesTo' method may call the 'ApplySkillBonus' more than once; the off-chance of 5 consecutive calls, where each preceding call applies one unique skill of the 'possibleSkills', would result in the 5th call entering the deadlock state. The fix is quite simple, evaluate the 'count' in the while statement and decrement it for each skill that is checked; removing each skill from the 'possibleSkills' list as they are checked, to prevent them being checked multiple times due to the random indices selection. --- Scripts/Items/Skill Items/Tools/BaseRunicTool.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs index ba258ffa5..53815a788 100644 --- a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs +++ b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; namespace Server.Items { @@ -180,7 +181,7 @@ namespace Server.Items private static void ApplySkillBonus( AosSkillBonuses attrs, int min, int max, int index, int low, int high ) { - SkillName[] possibleSkills = ( attrs.Owner is Spellbook ? m_PossibleSpellbookSkills : m_PossibleBonusSkills ); + List possibleSkills = new List( attrs.Owner is Spellbook ? m_PossibleSpellbookSkills : m_PossibleBonusSkills ); int count = ( Core.SE ? possibleSkills.Length : possibleSkills.Length - 2 ); SkillName sk, check; @@ -190,11 +191,12 @@ namespace Server.Items do { found = false; - sk = possibleSkills[Utility.Random( count )]; + sk = possibleSkills[Utility.Random( count-- )]; + possibleSkills.Remove(sk); for ( int i = 0; !found && i < 5; ++i ) found = ( attrs.GetValues( i, out check, out bonus ) && check == sk ); - } while ( found ); + } while ( found && count > 0 ); attrs.SetValues( index, sk, Scale( min, max, low, high ) ); } @@ -685,4 +687,4 @@ namespace Server.Items } } } -} \ No newline at end of file +} From c3dcb5d07e182ab5a2bf94f10baf211f5bfcb912 Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Mon, 20 Jul 2015 20:22:26 -0700 Subject: [PATCH 5/8] Create .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..2b8f00f6f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,2 @@ +language: csharp +solution: RunUO.sln From 28aa20340c3477e7853215e5abadc28fde71af23 Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Mon, 20 Jul 2015 20:43:51 -0700 Subject: [PATCH 6/8] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e9d8e7cb7..d7cb6c7a2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ runuo ===== +[![Build Status](https://travis-ci.org/runuo/runuo.svg)](https://travis-ci.org/runuo/runuo) + [![Join the chat at https://gitter.im/runuo/runuo](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/runuo/runuo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) RunUO Git Repository From 0be4162ae752279eaafd329107a9d36c9d88c7e4 Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Mon, 20 Jul 2015 20:46:36 -0700 Subject: [PATCH 7/8] fix minor patch errata --- Scripts/Items/Skill Items/Tools/BaseRunicTool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs index 53815a788..b18a0b75c 100644 --- a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs +++ b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs @@ -182,7 +182,7 @@ namespace Server.Items private static void ApplySkillBonus( AosSkillBonuses attrs, int min, int max, int index, int low, int high ) { List possibleSkills = new List( attrs.Owner is Spellbook ? m_PossibleSpellbookSkills : m_PossibleBonusSkills ); - int count = ( Core.SE ? possibleSkills.Length : possibleSkills.Length - 2 ); + int count = ( Core.SE ? possibleSkills.Count : possibleSkills.Count - 2 ); SkillName sk, check; double bonus; From 9df225fd05b5d60abc9d453a70e2ffcc9cb3abee Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Wed, 22 Jul 2015 11:30:30 -0700 Subject: [PATCH 8/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7cb6c7a2..dc44b627e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ runuo ===== -[![Build Status](https://travis-ci.org/runuo/runuo.svg)](https://travis-ci.org/runuo/runuo) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/4tjo91e4qotjtsgq?svg=true)](https://ci.appveyor.com/project/ms/runuo) [![Travis Build Status](https://travis-ci.org/runuo/runuo.svg)](https://travis-ci.org/runuo/runuo) [![Join the chat at https://gitter.im/runuo/runuo](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/runuo/runuo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)