# 通告配置 及 服務端下發內容格式#
## 靜態通告 ##
* ### 消息類型 ###
```
消息類型="notice_static"
```
* ### 消息內容 ###
> 消息內容 為xml格式。顯示的文字模板配置在本地client_noticeStatic.xml 中。根據element中的內容轉換文字模板中需要轉換的文字。如UID,道具名稱,成就名稱等
```xml
<notice type="對應client_noticeStatic.xml 中的type">
<elements>
<element type=""></element>
...
...(根據顯示內容element個數不定)
</elements>
</notice>
```
* element 類型
* 玩家昵稱
```
<element type="uid">要顯示玩家昵稱的uid</element>
```
* 道具名稱
```
<element type="item">item的type</element>
```
* 成就或目標
```
<element type="achievement">achievement的type</element>
```
* 直接轉換為要顯示的內容
```
<element type="">要轉換顯示的內容(比如要將VIP#1#變成VIP3就填入3)</element>
```
> 根據type不同配置不同的文字顏色,配置于client_notice_color.xml 中
---
### 示例 ###
公告內容: 玩家黃曉明豪擲千金,升級為VIP8,獲得了傘兵3個
 本地`client_noticeStatic.xml`中配置
```xml
<noticeStatic type="notice_example">
<description>notice_example_text</description>
</noticeStatic>
```
 本地`language_zh.text`中配置
```
notice_static::notice_example_text = 玩家#1#豪擲千金,升級為VIP#2#,獲得了#3##4#個
```
 服務端下發消息
```
消息類型="notice_static"
消息內容="<notice type="notice_example">
<elements>
<element type="uid">fb:72.hxm</element>
<element type="">2</element>
<element type="item">傘兵的itemtype(不記得了。。。。)</element>
<element type="">3</element>
</elements>
</notice>"
```
---
## 動態通告 ##
* ### 消息類型 ###
```
消息類型="notice"
```
* ### 消息內容 ###
> 消息內容 為xml格式。客戶端只轉換文中昵稱稱,道具名稱等轉換的內容。
```xml
<notice>
<text>文字內容</text>
<elements>
<element type=""></element>
...
...(element個數不定)
<elements>
</notice>
```
### 示例 ###
公告內容: 好消息!好消息!充值400就贈送傘兵一個!
 服務端下發消息
```
消息類型="notice"
消息內容="<notice>
<text><![CDATA[好消息!好消息!充值400就贈送#1#一個!]]></text>
<elements>
<element type="item">傘兵的itemtype(不記得了。。。。)</element>
</elements>
</notice>"
```