本文整理汇总了C#中Decal.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Decal.ToString方法的具体用法?C# Decal.ToString怎么用?C# Decal.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Decal
的用法示例。
在下文中一共展示了Decal.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Plugin_ChatBoxMessage
private void Plugin_ChatBoxMessage(object sender, Decal.Adapter.ChatTextInterceptEventArgs e)
{
try {
if (mCharconfig != null) {
string msg = e.ToString().Substring(1,e.ToString().Length -1);
//strip linefeed
int pos = 0;
switch (e.Color) {
case 0:
case 24:
if (msg.EndsWith("This permission will last one hour.")) {
pos = msg.IndexOf(" has given you permission to loot");
if (pos >= 0) {
string playercorpse = "Corpse of " + msg.Substring(0, pos);
if (!mProtectedCorpses.Contains(playercorpse)) {
wtcw("Alinco added " + playercorpse + " to protected corpses.", 0);
mProtectedCorpses.Add(playercorpse);
}
}
} else if (msg.EndsWith("DTLN")) {
msg += "= Air (West)";
wtcw(msg, e.Color);
e.Eat = true;
} else if (msg.EndsWith("DBTNK")) {
msg += " = Water (South)";
wtcw(msg, e.Color);
e.Eat = true;
} else if (msg.EndsWith("NTLN")) {
msg += " = Fire (North)";
wtcw(msg, e.Color);
e.Eat = true;
} else if (msg.EndsWith("ZTNK")) {
msg += " = Earth (East)";
wtcw(msg, e.Color);
e.Eat = true;
}
break;
case 7:
//spellcasting
if (mPluginConfig.FilterSpellcasting && msg.StartsWith("The spell")) {
e.Eat = true;
} else if (mPluginConfig.FilterSpellsExpire && msg.EndsWith("has expired.")) {
e.Eat = true;
// resists your spell
} else if (mPluginConfig.FilterChatResists && msg.StartsWith("You resist the spell")) {
e.Eat = true;
}
break;
case 17:
if (msg.IndexOf("Cruath Quareth") >= 0) {
mSpellwords = "Cruath Quareth";
} else if (msg.IndexOf("Cruath Quasith") >= 0) {
mSpellwords = "Cruath Quasith";
} else if (msg.IndexOf("Equin Opaj") >= 0) {
mSpellwords = "Equin Opaj";
} else if (msg.IndexOf("Equin Ozael") >= 0) {
mSpellwords = "Equin Ozael";
} else if (msg.IndexOf("Equin Ofeth") >= 0) {
mSpellwords = "Equin Ofeth";
} else if (mPluginConfig.FilterSpellcasting) {
if (msg.StartsWith("The spell")) {
e.Eat = true;
} else if (msg.StartsWith("You say, ")) {
e.Eat = true;
} else if (msg.IndexOf("says,\"") > 0) {
e.Eat = true;
}
}
break;
case 21:
//melee evades
if (mPluginConfig.FilterChatMeleeEvades) {
if (msg.IndexOf("You evaded") >= 0) {
e.Eat = true;
}
}
break;
case 3:
if (mPluginConfig.FilterTellsMerchant | mPluginConfig.notifytells) {
string actorname = actornamefromtell(msg);
WorldObject cursel = Core.WorldFilter[Host.Actions.CurrentSelection];
WorldObjectCollection actors = Core.WorldFilter.GetByName(actorname);
bool vendorTell = false;
bool npcTell = false;
//multipe actors possible?
foreach (WorldObject x in actors) {
if (x.ObjectClass == ObjectClass.Npc) {
npcTell = true;
} else if (x.ObjectClass == ObjectClass.Vendor) {
vendorTell = true;
//.........这里部分代码省略.........