forked from xDragonZ/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.修復寵物 3.修復玩家受到傷害異常 4.修復怪物攻擊玩家 5.修復全部的技能任務 6.修復使用飛鏢 7.修復怪物移動類型、攻擊類型、攻擊範圍、添加狀態 8.修復攻擊距離 9.修正錯誤
- Loading branch information
Showing
36 changed files
with
2,743 additions
and
315 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using Server.Common.Constants; | ||
using Server.Common.Data; | ||
using Server.Ghost.Characters; | ||
using System.Collections.Generic; | ||
|
||
namespace Server.Characters | ||
{ | ||
public class CharacterUseSlot : Dictionary<byte, byte> | ||
{ | ||
public Character Parent { get; private set; } | ||
|
||
public CharacterUseSlot(Character parent) | ||
{ | ||
this.Parent = parent; | ||
} | ||
|
||
public void Load() | ||
{ | ||
foreach (dynamic datum in new Datums("useslot").Populate("cid = '{0}'", this.Parent.ID)) | ||
{ | ||
this.Add((byte)datum.type, (byte)datum.slot); | ||
} | ||
} | ||
|
||
public int Slot(InventoryType.ItemType Type) | ||
{ | ||
foreach (KeyValuePair<byte, byte> UseSlot in this) | ||
{ | ||
if (UseSlot.Key == (byte)Type) | ||
return UseSlot.Value; | ||
} | ||
return -1; | ||
} | ||
|
||
public void Save() | ||
{ | ||
foreach (KeyValuePair<byte, byte> UseSlot in this) | ||
{ | ||
dynamic datum = new Datum("useslot"); | ||
|
||
datum.cid = this.Parent.ID; | ||
datum.type = UseSlot.Key; | ||
datum.slot = UseSlot.Value; | ||
datum.Insert(); | ||
} | ||
} | ||
|
||
public void Delete() | ||
{ | ||
Database.Delete("useslot", "cid = '{0}'", this.Parent.ID); | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
|
||
namespace Server.Ghost.Characters | ||
{ | ||
public class SkillFullException : Exception | ||
{ | ||
public override string Message | ||
{ | ||
get | ||
{ | ||
return "Skill full"; | ||
} | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.