This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
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.
- Loading branch information
Showing
9 changed files
with
563 additions
and
0 deletions.
There are no files selected for viewing
282 changes: 282 additions & 0 deletions
282
BilibiliDM_PluginFramework/BilibiliDM_PluginFramework.XML
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
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,50 @@ | ||
using System; | ||
using BilibiliDM_PluginFramework; | ||
|
||
namespace GoldSilver | ||
{ | ||
public class GoldSilver : DMPlugin | ||
{ | ||
public GoldSilver() | ||
{ | ||
ReceivedDanmaku += B_ReceivedDanmaku; | ||
PluginAuth = "lzblzr"; | ||
PluginName = "金银礼物"; | ||
PluginDesc = "在礼物后添加金银标识"; | ||
PluginCont = "[email protected]"; | ||
PluginVer = "v1.0.0"; | ||
Start(); | ||
} | ||
private void B_ReceivedDanmaku(object sender, ReceivedDanmakuArgs e) | ||
{ | ||
if (e.Danmaku.MsgType == MsgTypeEnum.GiftSend) | ||
{ | ||
string rawData = e.Danmaku.RawData; | ||
bool isGold = rawData.Contains("\"silver\":\""); | ||
bool isSilver = rawData.Contains("\"gold\":\""); | ||
e.Danmaku.GiftName += string.Format("({0})", isGold ? "金" : isSilver ? "银" : "包"); | ||
} | ||
} | ||
public override void Admin() | ||
{ | ||
base.Admin(); | ||
Console.WriteLine("不要点啦, 没用的"); | ||
Log("不要点啦, 没用的"); | ||
AddDM("不要点啦, 没用的", true); | ||
} | ||
public override void Start() | ||
{ | ||
base.Start(); | ||
Console.WriteLine("插件已启用"); | ||
Log("插件已启用"); | ||
AddDM("插件已启用", true); | ||
} | ||
public override void Stop() | ||
{ | ||
base.Stop(); | ||
Console.WriteLine("插件已禁用"); | ||
Log("插件已禁用"); | ||
AddDM("插件已禁用", true); | ||
} | ||
} | ||
} |
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,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{1B1AAED6-3040-4E49-AAF5-AE144F7A277B}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>GoldSilver</RootNamespace> | ||
<AssemblyName>GoldSilver</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="BilibiliDM_PluginFramework"> | ||
<HintPath>..\BilibiliDM_PluginFramework\BilibiliDM_PluginFramework.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="WindowsBase" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="GoldSilver.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
Oops, something went wrong.