Skip to content

Commit

Permalink
Merge branch 'develop' into compat-v4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizeta committed Sep 2, 2015
2 parents c47bff6 + 2b23f6a commit 17b2362
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
18 changes: 15 additions & 3 deletions KanColleCacher/FiddlerRules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ static void _BeforeRequest(Session oSession)
{
//返回本地文件
oSession.utilCreateResponseAndBypassServer();
oSession.ResponseBody = File.ReadAllBytes(filepath);
byte[] file;
using (var fs = File.Open(filepath, FileMode.Open, FileAccess.Read, FileShare.Read))
{
file = new byte[fs.Length];
fs.Read(file, 0, (int)fs.Length);
}
oSession.ResponseBody = file;
_CreateResponseHeader(oSession, filepath);

//Debug.WriteLine("CACHR> 【返回本地】" + filepath);
Expand Down Expand Up @@ -92,8 +98,14 @@ static void _BeforeResponse(Session oSession)
{
//服务器返回304,文件没有修改 -> 返回本地文件
oSession.bBufferResponse = true;
oSession.ResponseBody = File.ReadAllBytes(filepath);
oSession.oResponse.headers.HTTPResponseCode = 200;
byte[] file;
using (var fs = File.Open(filepath, FileMode.Open, FileAccess.Read, FileShare.Read))
{
file = new byte[fs.Length];
fs.Read(file, 0, (int)fs.Length);
}
oSession.ResponseBody = file;
oSession.oResponse.headers.HTTPResponseCode = 200;
oSession.oResponse.headers.HTTPResponseStatus = "200 OK";
oSession.oResponse.headers["Last-Modified"] = oSession.oRequest.headers["If-Modified-Since"];
oSession.oResponse.headers["Accept-Ranges"] = "bytes";
Expand Down
2 changes: 1 addition & 1 deletion KanColleCacher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static class AssemblyInfo
{

public const string Name = "KanColleCacher";
public const string Version = "2.2.2.34";
public const string Version = "2.3.0.38";
public const string Author = "d.f.32";
public const string Copyright = "©2014 - d.f.32";
#if DEBUG
Expand Down
8 changes: 8 additions & 0 deletions KanColleCacher/RespHacker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ public void Initialize()
fs.Write(res, 0, res.Length);
fs.Close();
}
else if (File.ReadAllLines(Directory.GetCurrentDirectory() + @"\Plugins\picture_book_ext.dat").Length < 242)
{
var res = new byte[Resources.picture_book_ext.Length];
Resources.picture_book_ext.CopyTo(res, 0);
var fs = new FileStream(Directory.GetCurrentDirectory() + @"\Plugins\picture_book_ext.dat", FileMode.Truncate, FileAccess.Write);
fs.Write(res, 0, res.Length);
fs.Close();
}
}

public void Dispose()
Expand Down
9 changes: 8 additions & 1 deletion KanColleCacher/picture_book_ext.dat
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,11 @@ api_index_no:234,api_kaih:51,api_tais:28,api_sinfo:"帝国海軍の駆逐艦で
api_index_no:235,api_kaih:50,api_tais:27,api_sinfo:"睦月型駆逐艦2番艦の如月と申します。<br>ウェーク島では五月蠅いF4F戦闘機の攻撃を受けながら奮戦しました。<br>いやん、ほんと、髪の毛が潮風で痛んじゃう……。"
api_index_no:237,api_kaih:46,api_tais:28,api_sinfo:"特Ⅲ型駆逐艦1番艦の暁よ。<br>吹雪型をベースに航行性能や航続距離を向上させたの。特型駆逐艦の最終完成形なんだから!<br>ちゃんとレディーとして活躍したのよ!<br>ほ、ほんとなんだからっ。"
api_index_no:217,api_kaih:38,api_tais:0,api_sinfo:"古鷹型重巡洋艦の2番艦、加古だよぉ。<br>第一次ソロモン海戦で大活躍したんだからね!<br>あ、帰り道?ホント、行きはよいよい、帰りは怖い~ってね!"
api_index_no:200,api_kaih:45,api_tais:48,api_sinfo:"長良型軽巡洋艦の阿武隈です。<br>はい…正直いって、北上さんは苦手です。なに、あの人…でも、艦首もきれいに直して頑張りました!<br>潮ちゃんも…ありがとね…。"
api_index_no:200,api_kaih:45,api_tais:48,api_sinfo:"長良型軽巡洋艦の阿武隈です。<br>はい…正直いって、北上さんは苦手です。なに、あの人…でも、艦首もきれいに直して頑張りました!<br>潮ちゃんも…ありがとね…。"
api_index_no:259,api_kaih:44,api_tais:21,api_sinfo:"白露型九番艦、改白露型駆逐艦の江風だ。<br>そうさ、海風の姉貴たちと同じ、マル2計画で建造されたよ。まー、働いた働いた。ソロモン海は何度も駆け回ったよ。最期は夜戦さ。敵さんの電探…ありゃー反則さ。"
api_index_no:251,api_kaih:19,api_tais:0,api_sinfo:"水上機母艦、瑞穂です。千歳、千代田に続いて建造された、甲標的も運用可能な特殊水上機母艦です。新機軸の機関部があまり上手くいかなくって……でも、開戦初頭の南方作戦などに参加致しました。お役に立てるよう頑張りますね!"
api_index_no:260,api_kaih:9,api_tais:5,api_sinfo:"艦隊随伴型の給油艦、速吸です。よろしくお願いします!<br>様々な物資を補給できる多用途給油艦でありながら、航空機の運用が可能な設計です。ミッドウェー海戦後の計画変更で流星の発進も可能となりました!"
api_index_no:243,api_kaih:48,api_tais:30,api_sinfo:"イタリア海軍の駆逐艦、マエストラーレ級三番艦、リベッチオです。提督さん、よろしくね!<br>え、タラント空襲?余裕です!船団護衛でも頑張りたかったけど…救助中はやめてほしいよ~!"
api_index_no:258,api_kaih:44,api_tais:23,api_sinfo:"白露型駆逐艦七番艦、改白露型としては一番艦となる海風です。<br>マル2計画によって建造されました。第二水雷戦隊の一翼として、ソロモン海の戦いにも参加しました。提督、どうぞよろしくお願い致します。"
api_index_no:253,api_kaih:47,api_tais:27,api_sinfo:"艦隊型駆逐艦、夕雲型駆逐艦の三番艦、風雲よ、よろしく。<br>あのミッドウェーからソロモンまで、主戦場を駆けたのよ。運命の日の夜、燃える空母を見上げたの。龍の最期、忘れない。"
api_index_no:222,api_kaih:47,api_tais:27,api_sinfo:"秋月型防空駆逐艦二番艦、照月よ。<br>秋月姉と第61駆逐隊を編成しました。ソロモンの激戦では、比叡さんや霧島さんと共に戦ったのよ!え?ドラム缶による鼠輸送?ああ、あれは…あれはね…。"

0 comments on commit 17b2362

Please sign in to comment.