game: npc 색상 분리
This commit is contained in:
+10
-1
@@ -79,7 +79,16 @@ function br2nl (text) {
|
||||
}
|
||||
*/
|
||||
|
||||
export function getNpcColor(npcType: number): 'cyan' | 'skyblue' | null {
|
||||
export function getNpcColor(npcType: number): 'skyblue' | 'cyan' | 'deepskyblue' | 'darkcyan' | 'mediumaquamarine' | null {
|
||||
if (npcType == 6){
|
||||
return 'mediumaquamarine';
|
||||
}
|
||||
if (npcType == 5){
|
||||
return 'darkcyan';
|
||||
}
|
||||
if (npcType == 4){
|
||||
return 'deepskyblue';
|
||||
}
|
||||
if (npcType >= 2) {
|
||||
return 'cyan';
|
||||
}
|
||||
|
||||
@@ -306,10 +306,8 @@ function printGeneralList(value: GeneralListResponse) {
|
||||
|
||||
if (general.reserved == 1) {
|
||||
general.userCSS = 'color:violet';
|
||||
} else if (general.npc >= 2) {
|
||||
general.userCSS = 'color:cyan';
|
||||
} else if (general.npc == 1) {
|
||||
general.userCSS = 'color:skyblue';
|
||||
} else if (general.npc > 0) {
|
||||
general.userCSS = `color:${getNPCColor(general.npc)}`;
|
||||
}
|
||||
|
||||
if (general.ownerName) {
|
||||
@@ -458,4 +456,8 @@ $(function ($) {
|
||||
_printGeneralList();
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function getNPCColor(npc: number) {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user